Merge branch 'release-4.7' into icu753
Этот коммит содержится в:
@@ -109,6 +109,33 @@ func TestGetExplicitMentions(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"OnePersonWithPeriodAtEndOfUsername": {
|
||||
Message: "this is a message for @user.name.",
|
||||
Keywords: map[string][]string{"@user.name.": {id1}},
|
||||
Expected: &ExplicitMentions{
|
||||
MentionedUserIds: map[string]bool{
|
||||
id1: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"OnePersonWithPeriodAtEndOfUsernameButNotSimilarName": {
|
||||
Message: "this is a message for @user.name.",
|
||||
Keywords: map[string][]string{"@user.name.": {id1}, "@user.name": {id2}},
|
||||
Expected: &ExplicitMentions{
|
||||
MentionedUserIds: map[string]bool{
|
||||
id1: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"OnePersonAtEndOfSentence": {
|
||||
Message: "this is a message for @user.",
|
||||
Keywords: map[string][]string{"@user": {id1}},
|
||||
Expected: &ExplicitMentions{
|
||||
MentionedUserIds: map[string]bool{
|
||||
id1: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"OnePersonWithoutAtMention": {
|
||||
Message: "this is a message for @user",
|
||||
Keywords: map[string][]string{"this": {id1}},
|
||||
@@ -179,6 +206,24 @@ func TestGetExplicitMentions(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"AtUserWithPeriodAtEndOfSentence": {
|
||||
Message: "this is a message for @user.period.",
|
||||
Keywords: map[string][]string{"@user.period": {id1}},
|
||||
Expected: &ExplicitMentions{
|
||||
MentionedUserIds: map[string]bool{
|
||||
id1: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"UserWithPeriodAtEndOfSentence": {
|
||||
Message: "this is a message for user.period.",
|
||||
Keywords: map[string][]string{"user.period": {id1}},
|
||||
Expected: &ExplicitMentions{
|
||||
MentionedUserIds: map[string]bool{
|
||||
id1: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"PotentialOutOfChannelUser": {
|
||||
Message: "this is an message for @potential and @user",
|
||||
Keywords: map[string][]string{"@user": {id1}},
|
||||
|
||||
Ссылка в новой задаче
Block a user