Add EventType::CallMissed and emit it for missed calls (#7840)#7955
Add EventType::CallMissed and emit it for missed calls (#7840)#7955
Conversation
1a47c12 to
413b12a
Compare
There was a problem hiding this comment.
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
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.
413b12a to
89f988e
Compare
It was fired if an already stale call arrives, i replaced it with
Yes, this isn't changed by the PR.
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
Done. |
Before, only
CallEndedwas emitted for missed calls, or, if a call arrives already being stale,IncomingMsg. Now:-
CallMissedis emitted in addition toCallEnded.-
IncomingMsgis replaced withCallMissedfor stale calls.Having only one event type for missed calls should simplify handling them in the apps.
This doesn't emit
CallMissedfor those who aren't allowed to call us. Also, don't emitCallEndedif the caller isn't allowed to call us and the call wasn't accepted, as there's no previous
IncomingCallevent in this case.Fix #7840