Fix mistake in reaction replace error handling
This commit is contained in:
@@ -1526,10 +1526,11 @@ func (portal *Portal) handleDiscordReaction(user *User, reaction *discordgo.Mess
|
|||||||
resp, err := intent.RedactEvent(portal.MXID, existing.MXID)
|
resp, err := intent.RedactEvent(portal.MXID, existing.MXID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
portal.log.Warnfln("Failed to remove reaction from %s: %v", portal.MXID, err)
|
portal.log.Warnfln("Failed to remove reaction from %s: %v", portal.MXID, err)
|
||||||
|
} else {
|
||||||
|
go portal.sendDeliveryReceipt(resp.EventID)
|
||||||
}
|
}
|
||||||
|
|
||||||
existing.Delete()
|
existing.Delete()
|
||||||
go portal.sendDeliveryReceipt(resp.EventID)
|
|
||||||
return
|
return
|
||||||
} else if existing != nil {
|
} else if existing != nil {
|
||||||
portal.log.Debugfln("Ignoring duplicate reaction %s from %s to %s", discordID, reaction.UserID, message[0].DiscordID)
|
portal.log.Debugfln("Ignoring duplicate reaction %s from %s to %s", discordID, reaction.UserID, message[0].DiscordID)
|
||||||
|
|||||||
Reference in New Issue
Block a user