summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-02-06 17:25:53 +0000
committerGeorge Goldberg <george@gberg.me>2018-02-06 17:25:53 +0000
commit7941c30117efe1b957ac0458c2f0479e3824196d (patch)
treedf791632a9dc790a6f73dec53aae3ba919ebda63 /app/notification.go
parente1cd64613591cf5a990442a69ebf188258bd0cb5 (diff)
parent034dbc07e3068c482e654b6a1a8fcbe4b01c44f3 (diff)
downloadchat-7941c30117efe1b957ac0458c2f0479e3824196d.tar.gz
chat-7941c30117efe1b957ac0458c2f0479e3824196d.tar.bz2
chat-7941c30117efe1b957ac0458c2f0479e3824196d.zip
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/notification.go b/app/notification.go
index 7223fb3aa..19f7894c5 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -584,16 +584,16 @@ func (a *App) sendPushNotification(post *model.Post, user *model.User, channel *
msg.ChannelName = channel.Name
msg.SenderId = post.UserId
- if ou, ok := post.Props["override_username"]; ok && ou != nil {
- msg.OverrideUsername = ou.(string)
+ if ou, ok := post.Props["override_username"].(string); ok {
+ msg.OverrideUsername = ou
}
- if oi, ok := post.Props["override_icon_url"]; ok && oi != nil {
- msg.OverrideIconUrl = oi.(string)
+ if oi, ok := post.Props["override_icon_url"].(string); ok {
+ msg.OverrideIconUrl = oi
}
- if fw, ok := post.Props["from_webhook"]; ok && fw != nil {
- msg.FromWebhook = fw.(string)
+ if fw, ok := post.Props["from_webhook"].(string); ok {
+ msg.FromWebhook = fw
}
if *a.Config().EmailSettings.PushNotificationContents == model.FULL_NOTIFICATION {