feat: Add EventType::CallMissed and emit it for missed calls (#7840)

Before, only `CallEnded` was emitted for missed calls, or, if a call arrives already being stale,
`IncomingMsg`. Now:
- `CallMissed` is emitted in addition to `CallEnded`.
- `IncomingMsg` is replaced with `CallMissed` for stale calls.
Having only one event type for missed calls should simplify handling them in the apps.

This doesn't emit `CallMissed` for those who aren't allowed to call us. Also, don't emit `CallEnded`
if the caller isn't allowed to call us and the call wasn't accepted, as there's no previous
`IncomingCall` event in this case.
This commit is contained in:
iequidoo
2026-03-04 20:12:47 -03:00
parent a2bb8962cb
commit ee0a0a6c3d
6 changed files with 198 additions and 51 deletions

View File

@@ -419,6 +419,14 @@ pub enum EventType {
chat_id: ChatId,
},
/// Call missed.
CallMissed {
/// ID of the message referring to the call.
msg_id: MsgId,
/// ID of the chat which the message belongs to.
chat_id: ChatId,
},
/// One or more transports has changed or another transport is primary now.
///
/// UI should update the list.