Skip to content

Commit

Permalink
connector/ids: fix MakeMessageID
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Nov 21, 2024
1 parent 22f4473 commit 6b6a6ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/connector/ids/ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ func MakeMessageID(rawChatID any, messageID int) networkid.MessageID {
var channelID int64
switch typedChatID := rawChatID.(type) {
case networkid.PortalKey:
if typedChatID.Receiver == "" {
_, channelID, _ = ParsePortalID(typedChatID.ID)
peerType, entityID, _ := ParsePortalID(typedChatID.ID)
if peerType == PeerTypeChannel {
channelID = entityID
}
case *tg.PeerChannel:
channelID = typedChatID.ChannelID
Expand Down

0 comments on commit 6b6a6ba

Please sign in to comment.