Fix status broadcast check accidentally muting all chats

This commit is contained in:
Tulir Asokan 2021-11-22 11:03:09 +02:00
parent 79256096c5
commit a61ef492cf
2 changed files with 2 additions and 2 deletions

View file

@ -2142,7 +2142,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event) {
portal.log.Debugln("Sending event", evt.ID, "to WhatsApp", info.ID)
ts, err := sender.Client.SendMessage(portal.Key.JID, info.ID, msg)
if err != nil {
portal.log.Errorln("Error sending message: %v", err)
portal.log.Errorfln("Error sending message: %v", err)
portal.sendErrorMessage(err.Error(), true)
portal.bridge.AS.SendErrorMessageSendCheckpoint(evt, appservice.StepRemote, err, true)
} else {

View file

@ -573,7 +573,7 @@ func (user *User) syncChatDoublePuppetDetails(portal *Portal, justCreated bool)
return
}
intent := doublePuppet.CustomIntent()
if justCreated && user.bridge.Config.Bridge.MuteStatusBroadcast {
if portal.Key.JID == types.StatusBroadcastJID && justCreated && user.bridge.Config.Bridge.MuteStatusBroadcast {
user.updateChatMute(intent, portal, time.Now().Add(365*24*time.Hour))
user.updateChatTag(intent, portal, user.bridge.Config.Bridge.ArchiveTag, true)
return