Fix bug with cross-room status replies

This commit is contained in:
Tulir Asokan 2023-04-26 15:16:36 +03:00
parent c7b6826455
commit fd83ea8c0a

View file

@ -1894,7 +1894,7 @@ func (portal *Portal) SetReply(content *event.MessageEventContent, replyTo *Repl
if portal.bridge.Config.Bridge.CrossRoomReplies && !replyTo.Chat.IsEmpty() && replyTo.Chat != key.JID { if portal.bridge.Config.Bridge.CrossRoomReplies && !replyTo.Chat.IsEmpty() && replyTo.Chat != key.JID {
if replyTo.Chat.Server == types.GroupServer { if replyTo.Chat.Server == types.GroupServer {
key = database.NewPortalKey(replyTo.Chat, types.EmptyJID) key = database.NewPortalKey(replyTo.Chat, types.EmptyJID)
} else if replyTo.Chat == types.BroadcastServerJID { } else if replyTo.Chat == types.StatusBroadcastJID {
key = database.NewPortalKey(replyTo.Chat, key.Receiver) key = database.NewPortalKey(replyTo.Chat, key.Receiver)
} }
if key != portal.Key { if key != portal.Key {