connector/ids: fix MakeMessageID
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user