mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
Fix status broadcast check accidentally muting all chats
This commit is contained in:
parent
79256096c5
commit
a61ef492cf
2 changed files with 2 additions and 2 deletions
|
@ -2142,7 +2142,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event) {
|
||||||
portal.log.Debugln("Sending event", evt.ID, "to WhatsApp", info.ID)
|
portal.log.Debugln("Sending event", evt.ID, "to WhatsApp", info.ID)
|
||||||
ts, err := sender.Client.SendMessage(portal.Key.JID, info.ID, msg)
|
ts, err := sender.Client.SendMessage(portal.Key.JID, info.ID, msg)
|
||||||
if err != nil {
|
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.sendErrorMessage(err.Error(), true)
|
||||||
portal.bridge.AS.SendErrorMessageSendCheckpoint(evt, appservice.StepRemote, err, true)
|
portal.bridge.AS.SendErrorMessageSendCheckpoint(evt, appservice.StepRemote, err, true)
|
||||||
} else {
|
} else {
|
||||||
|
|
2
user.go
2
user.go
|
@ -573,7 +573,7 @@ func (user *User) syncChatDoublePuppetDetails(portal *Portal, justCreated bool)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
intent := doublePuppet.CustomIntent()
|
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.updateChatMute(intent, portal, time.Now().Add(365*24*time.Hour))
|
||||||
user.updateChatTag(intent, portal, user.bridge.Config.Bridge.ArchiveTag, true)
|
user.updateChatTag(intent, portal, user.bridge.Config.Bridge.ArchiveTag, true)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue