pins: bridge from Telegram -> Matrix

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-10-02 11:05:02 -06:00
parent abba9bcf81
commit 083837aa9e
5 changed files with 79 additions and 0 deletions
+8
View File
@@ -110,6 +110,14 @@ func (t *TelegramClient) takeoutDialogs(ctx context.Context, takeoutID int64) er
return nil
}
if req.OffsetPeer.TypeID() == tg.InputPeerEmptyTypeID {
// This is the first fetch of dialogs, reset the pinned dialogs
// based on the list.
if err := t.resetPinnedDialogs(ctx, dialogs.GetDialogs()); err != nil {
return err
}
}
err = t.handleDialogs(ctx, dialogs, -1)
if err != nil {
return fmt.Errorf("failed to handle dialogs: %w", err)