router: limit fba2749b0b to discord only
This commit is contained in:
@@ -143,9 +143,18 @@ func (r *Router) handleReceive() {
|
|||||||
msgIDs = append(msgIDs, gw.handleMessage(&msg, br)...)
|
msgIDs = append(msgIDs, gw.handleMessage(&msg, br)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always add/update the message ID. This is necessary as msgIDs
|
if msg.ID != "" {
|
||||||
// will change if a bridge returns a different ID in response to edits.
|
_, exists := gw.Messages.Get(msg.Protocol + " " + msg.ID)
|
||||||
gw.Messages.Add(msg.Protocol+" "+msg.ID, msgIDs)
|
|
||||||
|
// Only add the message ID if it doesn't already exist
|
||||||
|
//
|
||||||
|
// For some bridges we always add/update the message ID.
|
||||||
|
// This is necessary as msgIDs will change if a bridge returns
|
||||||
|
// a different ID in response to edits.
|
||||||
|
if !exists || msg.Protocol == "discord" {
|
||||||
|
gw.Messages.Add(msg.Protocol+" "+msg.ID, msgIDs)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user