MM-31062: Rewrite empty string checks to be more idiomatic (#16587)
https://mattermost.atlassian.net/browse/MM-31062 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1a131b54af
Коммит
6487d0ca91
@@ -780,10 +780,10 @@ func getMentionsEnabledFields(post *model.Post) model.StringArray {
|
||||
ret = append(ret, post.Message)
|
||||
for _, attachment := range post.Attachments() {
|
||||
|
||||
if len(attachment.Pretext) != 0 {
|
||||
if attachment.Pretext != "" {
|
||||
ret = append(ret, attachment.Pretext)
|
||||
}
|
||||
if len(attachment.Text) != 0 {
|
||||
if attachment.Text != "" {
|
||||
ret = append(ret, attachment.Text)
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user