Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add portal to cache also when creating a portal from the matrix side #902

Merged
merged 3 commits into from
May 7, 2023

Conversation

maltee1
Copy link
Contributor

@maltee1 maltee1 commented Mar 21, 2023

Fixes #367

I also moved the call to get_telegram_users_from_matrix_room() to create_telegram_chat() to reduce code doubling and parameters passed to the latter function, because I had to touch that part anyway. I didn't see a good reason not to.

@maltee1 maltee1 force-pushed the portal_to_cache_on_matrix_side_create branch from 6705bbb to 21a0d80 Compare March 21, 2023 14:13
@tulir
Copy link
Member

tulir commented Mar 22, 2023

This seems to only handle creating chats, while the original issue was about manually bridging 🤔

@maltee1
Copy link
Contributor Author

maltee1 commented Mar 30, 2023

The bridge command does not have this problem. The original issue also describes creating a Telegram group from Matrix and does not mention the bridge command.

Comment on lines 568 to 574
error_list = "\n".join(f"* [{mxid}](https://matrix.to/#/{mxid})" for mxid in errors)
await self.az.intent.send_notice(
self.mxid,
f"Failed to add the following users to the chat:\n\n{error_list}\n\n"
"You can try `$cmdprefix+sp search -r <username>` to help the bridge find "
"those users.",
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

send_notice doesn't parse markdown automatically

@maltee1 maltee1 force-pushed the portal_to_cache_on_matrix_side_create branch from 453a691 to 1c1c6cb Compare May 1, 2023 19:55
@tulir tulir merged commit cb5c51c into mautrix:master May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

New room, M>T comes from bot, when should from puppet
2 participants