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
|
var channelID int64
|
||||||
switch typedChatID := rawChatID.(type) {
|
switch typedChatID := rawChatID.(type) {
|
||||||
case networkid.PortalKey:
|
case networkid.PortalKey:
|
||||||
if typedChatID.Receiver == "" {
|
peerType, entityID, _ := ParsePortalID(typedChatID.ID)
|
||||||
_, channelID, _ = ParsePortalID(typedChatID.ID)
|
if peerType == PeerTypeChannel {
|
||||||
|
channelID = entityID
|
||||||
}
|
}
|
||||||
case *tg.PeerChannel:
|
case *tg.PeerChannel:
|
||||||
channelID = typedChatID.ChannelID
|
channelID = typedChatID.ChannelID
|
||||||
|
|||||||
Reference in New Issue
Block a user