Skip to content

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

Open
iequidoo wants to merge 1 commit intomainfrom
iequidoo/CallMissed
Open

Add EventType::CallMissed and emit it for missed calls (#7840)#7955
iequidoo wants to merge 1 commit intomainfrom
iequidoo/CallMissed

Conversation

@iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Mar 5, 2026

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.

Fix #7840

@iequidoo iequidoo marked this pull request as draft March 5, 2026 13:14
@iequidoo iequidoo force-pushed the iequidoo/CallMissed branch 2 times, most recently from 1a47c12 to 413b12a Compare March 5, 2026 13:28
@iequidoo iequidoo marked this pull request as ready for review March 5, 2026 13:47
@iequidoo iequidoo requested review from Amzd, link2xt and r10s March 5, 2026 13:47
Copy link
Contributor

@r10s r10s left a comment

Choose a reason for hiding this comment

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

However, maybe CallMissed should only replace IncomingMsg

i think, IncomingMsg was never fired, this is at least the original issue.

and MsgsChanged still needs to be fired, as this is about redrawing the bubble.

but be emitted in addition to CallEnded and not replace it?

yes. CallEnded should not be fired less.

so, CallMissed is fired additionally to CallEnded.

the gist of the three events is different:

  • MsgsChanged - refresh the corresponding bubble

  • CallEnded - close the call UI

  • CallMissed - add a notification about the missed call

so, might be that at the end of the call, all three events are fired. at a first glance, this PR needs adaption.

in other words, this PR should only fire CallMissed additionally, and not remove any other event.

also, deltachat.h needs the event and documentation

@iequidoo iequidoo marked this pull request as draft March 5, 2026 14:25
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.
@iequidoo iequidoo force-pushed the iequidoo/CallMissed branch from 413b12a to 89f988e Compare March 5, 2026 15:44
@iequidoo
Copy link
Collaborator Author

iequidoo commented Mar 5, 2026

i think, IncomingMsg was never fired, this is at least the original issue.

It was fired if an already stale call arrives, i replaced it with CallMissed.

and MsgsChanged still needs to be fired, as this is about redrawing the bubble.

Yes, this isn't changed by the PR.

yes. CallEnded should not be fired less.

Now it's not fired less except for the case when the caller isn't allowed to call us and we didn't accept the call because in this case we don't emit IncomingCall as well.

also, deltachat.h needs the event and documentation

Done.

@iequidoo iequidoo marked this pull request as ready for review March 5, 2026 15:55
@iequidoo iequidoo requested a review from r10s March 5, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incoming message event not fired on all code paths for missed call

2 participants