connector: notify when call starts/ends

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-09-05 12:25:32 -06:00
parent b0e6dcb1d6
commit f91b429c47
2 changed files with 148 additions and 18 deletions
+4
View File
@@ -63,6 +63,8 @@ type TelegramClient struct {
takeoutAccepted *exsync.Event
stopTakeoutTimer *time.Timer
takeoutDialogsOnce sync.Once
activeCalls map[int64]networkid.PortalKey
}
var (
@@ -193,6 +195,8 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
return client.onPeerBlocked(ctx, update)
})
dispatcher.OnChat(client.onChat)
dispatcher.OnPhoneCall(client.onPhoneCall)
dispatcher.OnGroupCall(client.onGroupCall)
client.ScopedStore = tc.Store.GetScopedStore(telegramUserID)