From 987395914e79c790168457bf1c54e2de05316d97 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Mon, 9 Dec 2024 09:43:30 -0700 Subject: [PATCH] connector: add stream order to new messages Signed-off-by: Sumner Evans --- pkg/connector/telegram.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/connector/telegram.go b/pkg/connector/telegram.go index 9e2f6197..21a3ef69 100644 --- a/pkg/connector/telegram.go +++ b/pkg/connector/telegram.go @@ -138,6 +138,7 @@ func (t *TelegramClient) onUpdateNewMessage(ctx context.Context, entities tg.Ent PortalKey: t.makePortalKeyFromPeer(msg.PeerID), CreatePortal: true, Timestamp: time.Unix(int64(msg.Date), 0), + StreamOrder: int64(msg.GetID()), }, ID: ids.GetMessageIDFromMessage(msg), Data: msg, @@ -158,6 +159,7 @@ func (t *TelegramClient) onUpdateNewMessage(ctx context.Context, entities tg.Ent Bool("is_from_me", sender.IsFromMe). Stringer("peer_id", msg.PeerID) }, + StreamOrder: int64(msg.GetID()), } switch action := msg.Action.(type) {