-
-
Notifications
You must be signed in to change notification settings - Fork 107
api: Put the chattype into the SecurejoinInviterProgress event #7181
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
Conversation
wouldn't it make sense to also have the chat id? otherwise how do I know which group the contact joined into? |
Do you need the chat id for something specific? When the SecurejoinInviterProgress event is sent because we just observed a securejoin that happened on a second device, it's not trivial to find out the chat id. I'm sure it's possible (though I didn't check how), but I wouldn't do it if there isn't any particular reason to include it. |
I think this PR is useful for bots which have the only group or map each contact to a particular group, otherwise yes, the chat id would be nice to have. As for multi-device bots, i think it's overall hard to implement them, it's not clear which device should process user's request. Maybe providing an optional chat id (with |
this is not enough. there needs to be at least one real-world-existent and in-use application that needs it, waits for it and will use it. as for the problem at hand that @adbenitez pointed out and is solved by this PR |
There is even no need to look up a chat id (which may not exist on the second device for various reasons), but the EDIT: |
grpid is an implementation detail, there is no utility for UIs to know it |
I have a bot that needs a reliable "member added to chat id" event that works in all cases. I currently use "chat modified", but that fires also in other cases, I would like to have a more specific event for this case to re-send my "welcome message". But maybe that's something different that needs a separate issue? (listening to secure join event AND incoming "member added"-system-messages feels a hack anyway and is not really good bot developer UX) |
I mean, what we can do is, add a
Yes, probably best discussed in a new issue. |
I made a dedicated issue for my problem #7183 |
This is good enough (and was suggested above btw). And this doesn't require extra db queries on the first device. Still, the chat type is also useful, so both may be put into the event. |
Quoting @adbenitez:
Since it's easy enough to add this information to the SecurejoinInviterProgress event, I wrote a PR to do so.