Skip to content

Commit

Permalink
Merge pull request #4 from mattermost/PLT-3241
Browse files Browse the repository at this point in the history
PLT-3241 truncating long messages
  • Loading branch information
coreyhulen authored Jun 14, 2016
2 parents e695cea + 5c63b5e commit f38b7a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func handleSendNotification(w http.ResponseWriter, r *http.Request) {
LogError("Failed because of missing server Id")
}

if len(msg.Message) > 2047 {
msg.Message = msg.Message[0:2046]
}

if msg.Platform == PUSH_NOTIFY_APPLE {
go sendAppleNotification(msg)
} else if msg.Platform == PUSH_NOTIFY_ANDROID {
Expand Down

0 comments on commit f38b7a9

Please sign in to comment.