chatmail / chatmail/core

reliable "member added to chat id" event for bots

Open
#7,183 3 comments 0 reactions 0 assignees View on GitHub
bot
Dominant language
Rust
Stars
929
Forks
143
Avg merge
1d 20h
Merged PRs (30d)
53

Description

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".

## workaround idea

The closest you can currently get to a more specific event is to listen to incoming "member added"-system-messages and also to "secure join progress 1000 events", because secure join doesn't trigger a member added message.

But the problem with the secure join events is that you only get a contact id, not which chat was joined. https://github.com/chatmail/core/pull/7181 adds the chat type as property to the event, but it is not possible to easily get the chat id in that event, especially on other devices on multi device setups. (https://github.com/chatmail/core/pull/7181#issuecomment-3267809167)

Anyways this workaround would still be bad bot developer UX, even if it worked, so I propose that we should add a new "member added to chat id" event for bots that is emitted in all cases.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.