summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
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 {