MM-31062: Rewrite empty string checks to be more idiomatic (#16587)

https://mattermost.atlassian.net/browse/MM-31062

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2020-12-22 19:20:59 +05:30
коммит произвёл GitHub
родитель 1a131b54af
Коммит 6487d0ca91
25 изменённых файлов: 54 добавлений и 54 удалений

Просмотреть файл

@@ -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)
}
}