Fix saving +draft/react
is msgstores
This commit fixes a bug where only TAGMSGs with a `+react` tag would be stored, when a `+draft/react` tag is normative. I have kept messages containing `+react` as well, as they will most likely be used in the future. I have also reversed the order of tag inspection, as I found the new order to be more readable.
This commit is contained in:
parent
48f81f0b2d
commit
bb8397057e
@ -49,6 +49,7 @@ var permanentUpstreamCaps = map[string]bool{
|
|||||||
// storableMessageTags is the static list of message tags that will cause
|
// storableMessageTags is the static list of message tags that will cause
|
||||||
// a TAGMSG to be stored.
|
// a TAGMSG to be stored.
|
||||||
var storableMessageTags = map[string]bool{
|
var storableMessageTags = map[string]bool{
|
||||||
|
"+draft/react": true,
|
||||||
"+react": true,
|
"+react": true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2099,8 +2100,8 @@ func (uc *upstreamConn) appendLog(entity string, msg *irc.Message) (msgID string
|
|||||||
}
|
}
|
||||||
if msg.Command == "TAGMSG" {
|
if msg.Command == "TAGMSG" {
|
||||||
store := false
|
store := false
|
||||||
for tag := range storableMessageTags {
|
for tag := range msg.Tags {
|
||||||
if _, ok := msg.Tags[tag]; ok {
|
if storableMessageTags[tag] {
|
||||||
store = true
|
store = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user