Fix out-of-channel mentions for usernames with dashes (#7151)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
ffbf8e51fe
Коммит
bbf6c81a06
@@ -828,12 +828,14 @@ func GetExplicitMentions(message string, keywords map[string][]string) (map[stri
|
|||||||
// Case-sensitive check for first name
|
// Case-sensitive check for first name
|
||||||
if ids, match := keywords[splitWord]; match {
|
if ids, match := keywords[splitWord]; match {
|
||||||
addMentionedUsers(ids)
|
addMentionedUsers(ids)
|
||||||
} else if _, ok := systemMentions[word]; !ok && strings.HasPrefix(word, "@") {
|
} else if _, ok := systemMentions[splitWord]; !ok && strings.HasPrefix(splitWord, "@") {
|
||||||
username := word[1:len(splitWord)]
|
username := splitWord[1:]
|
||||||
potentialOthersMentioned = append(potentialOthersMentioned, username)
|
potentialOthersMentioned = append(potentialOthersMentioned, username)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if _, ok := systemMentions[word]; !ok && strings.HasPrefix(word, "@") {
|
}
|
||||||
|
|
||||||
|
if _, ok := systemMentions[word]; !ok && strings.HasPrefix(word, "@") {
|
||||||
username := word[1:]
|
username := word[1:]
|
||||||
potentialOthersMentioned = append(potentialOthersMentioned, username)
|
potentialOthersMentioned = append(potentialOthersMentioned, username)
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user