Add @ prefix for sender username in push notifications (#11934)
* Add @ prefix for sender username in push notifications * de-duplicating code
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
f753819a66
Коммит
24e0d6f00d
@@ -640,7 +640,7 @@ type postNotification struct {
|
||||
func (n *postNotification) GetChannelName(userNameFormat string, excludeId string) string {
|
||||
switch n.channel.Type {
|
||||
case model.CHANNEL_DIRECT:
|
||||
return n.sender.GetDisplayName(userNameFormat)
|
||||
return n.sender.GetDisplayNameWithPrefix(userNameFormat, "@")
|
||||
case model.CHANNEL_GROUP:
|
||||
names := []string{}
|
||||
for _, user := range n.profileMap {
|
||||
@@ -670,7 +670,7 @@ func (n *postNotification) GetSenderName(userNameFormat string, overridesAllowed
|
||||
}
|
||||
}
|
||||
|
||||
return n.sender.GetDisplayName(userNameFormat)
|
||||
return n.sender.GetDisplayNameWithPrefix(userNameFormat, "@")
|
||||
}
|
||||
|
||||
// addMentionedUsers will add the mentioned user id in the struct's list for mentioned users
|
||||
|
||||
Ссылка в новой задаче
Block a user