team113 / messenger

Open-source front-end part of messenger by team113
GNU Affero General Public License v3.0
19 stars 15 forks source link

Fix finished `ChatCall`s being rapidly displayed on `Chats` tab during synchronization #1106

Closed SleepySquash closed 2 months ago

SleepySquash commented 2 months ago

Synopsis

Whenever application is being logged in, it loads the actual state of Chats user has. However, if there's many call events, the chats will rapidly display those calls as being started and then being ended.

Solution

This PR fixes some events not setting conversationStartedAt, dialing variable being ignored and fixes displaying of the already finished calls.

Checklist

SleepySquash commented 2 months ago

FCM

Debounce `ChatEventsVersioned` received in `RxChat` during `Chat`s synchronization (#1106)

Additionally:
- add `EventChatCallAnswerTimeoutPassed` handling to `RxChat`
- fix already answered or declined `OngoingCall`s appearing again during synchronization
- use `RecentChatTile.hasCall` to prevent local `ChatCall`s from being rendered as active