Merge branch 'master' into mark-as-unread

Этот коммит содержится в:
Harrison Healey
2019-11-19 09:45:03 -05:00
родитель 2f066da704 c40f0a4aea
Коммит de913e7537
108 изменённых файлов: 11124 добавлений и 1190 удалений

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

@@ -139,7 +139,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
updateMentionChans = append(updateMentionChans, umc)
}
notification := &postNotification{
notification := &PostNotification{
post: post,
channel: channel,
profileMap: profileMap,
@@ -691,7 +691,7 @@ func addMentionKeywordsForUser(keywords map[string][]string, profile *model.User
}
// Represents either an email or push notification and contains the fields required to send it to any user.
type postNotification struct {
type PostNotification struct {
channel *model.Channel
post *model.Post
profileMap map[string]*model.User
@@ -701,7 +701,7 @@ type postNotification struct {
// Returns the name of the channel for this notification. For direct messages, this is the sender's name
// preceeded by an at sign. For group messages, this is a comma-separated list of the members of the
// channel, with an option to exclude the recipient of the message from that list.
func (n *postNotification) GetChannelName(userNameFormat string, excludeId string) string {
func (n *PostNotification) GetChannelName(userNameFormat, excludeId string) string {
switch n.channel.Type {
case model.CHANNEL_DIRECT:
return n.sender.GetDisplayNameWithPrefix(userNameFormat, "@")
@@ -723,7 +723,7 @@ func (n *postNotification) GetChannelName(userNameFormat string, excludeId strin
// Returns the name of the sender of this notification, accounting for things like system messages
// and whether or not the username has been overridden by an integration.
func (n *postNotification) GetSenderName(userNameFormat string, overridesAllowed bool) string {
func (n *PostNotification) GetSenderName(userNameFormat string, overridesAllowed bool) string {
if n.post.IsSystemMessage() {
return utils.T("system.message.name")
}