Check double puppet indicator value when dropping events

This commit is contained in:
Tulir Asokan 2021-12-17 01:56:07 +02:00
parent d3fc0ed43f
commit ce2ae44939

View file

@ -320,7 +320,7 @@ func (mx *MatrixHandler) shouldIgnoreEvent(evt *event.Event) bool {
if _, isPuppet := mx.bridge.ParsePuppetMXID(evt.Sender); evt.Sender == mx.bridge.Bot.UserID || isPuppet {
return true
}
if _, ok := evt.Content.Raw[doublePuppetKey]; ok && mx.bridge.GetPuppetByCustomMXID(evt.Sender) != nil {
if val, ok := evt.Content.Raw[doublePuppetKey]; ok && val == doublePuppetValue && mx.bridge.GetPuppetByCustomMXID(evt.Sender) != nil {
return true
}
user := mx.bridge.GetUserByMXID(evt.Sender)