summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/channel.go2
-rw-r--r--api/post.go10
-rw-r--r--api/preference.go2
-rw-r--r--api/preference_test.go2
-rw-r--r--api/templates/post_body.html2
-rw-r--r--api/user.go8
6 files changed, 15 insertions, 11 deletions
diff --git a/api/channel.go b/api/channel.go
index 659121bf0..f17594c0a 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -740,7 +740,7 @@ func getChannelExtraInfo(c *Context, w http.ResponseWriter, r *http.Request) {
}
scm := Srv.Store.Channel().GetMember(id, c.Session.UserId)
- ecm := Srv.Store.Channel().GetExtraMembers(id, 20)
+ ecm := Srv.Store.Channel().GetExtraMembers(id, 100)
ccm := Srv.Store.Channel().GetMemberCount(id)
if cmresult := <-scm; cmresult.Err != nil {
diff --git a/api/post.go b/api/post.go
index 5f9dbc775..97211b391 100644
--- a/api/post.go
+++ b/api/post.go
@@ -536,8 +536,7 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
teamURL := c.GetSiteURL() + "/" + team.Name
// Build and send the emails
- location, _ := time.LoadLocation("UTC")
- tm := time.Unix(post.CreateAt/1000, 0).In(location)
+ tm := time.Unix(post.CreateAt/1000, 0)
subjectPage := NewServerTemplatePage("post_subject")
subjectPage.Props["SiteURL"] = c.GetSiteURL()
@@ -569,6 +568,7 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
bodyPage.Props["Minute"] = fmt.Sprintf("%02d", tm.Minute())
bodyPage.Props["Month"] = tm.Month().String()[:3]
bodyPage.Props["Day"] = fmt.Sprintf("%d", tm.Day())
+ bodyPage.Props["TimeZone"], _ = tm.Zone()
bodyPage.Props["PostMessage"] = model.ClearMentionTags(post.Message)
bodyPage.Props["TeamLink"] = teamURL + "/channels/" + channel.Name
@@ -624,7 +624,11 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
msg.DeviceId = strings.TrimPrefix(session.DeviceId, "apple:")
msg.ServerId = utils.CfgDiagnosticId
- msg.Message = profileMap[id].FirstName + " mentioned you in " + channel.DisplayName
+ if channel.Type == model.CHANNEL_DIRECT {
+ msg.Message = channelName + " sent you a direct message"
+ } else {
+ msg.Message = profileMap[id].FirstName + " mentioned you in " + channelName
+ }
httpClient := http.Client{}
request, _ := http.NewRequest("POST", *utils.Cfg.EmailSettings.PushNotificationServer+"/api/v1/send_push", strings.NewReader(msg.ToJson()))
diff --git a/api/preference.go b/api/preference.go
index 6d6ac1a7f..e9c74aafe 100644
--- a/api/preference.go
+++ b/api/preference.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api
diff --git a/api/preference_test.go b/api/preference_test.go
index 2f6204246..310b4dcdb 100644
--- a/api/preference_test.go
+++ b/api/preference_test.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api
diff --git a/api/templates/post_body.html b/api/templates/post_body.html
index 182134b1a..00d4a563d 100644
--- a/api/templates/post_body.html
+++ b/api/templates/post_body.html
@@ -18,7 +18,7 @@
<tr>
<td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;">
<h2 style="font-weight: normal; margin-top: 10px;">You were mentioned</h2>
- <p>CHANNEL: {{.Props.ChannelName}}<br>{{.Props.SenderName}} - {{.Props.Hour}}:{{.Props.Minute}} GMT, {{.Props.Month}} {{.Props.Day}}<br><pre style="text-align:left;font-family: 'Lato', sans-serif; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">{{.Props.PostMessage}}</pre></p>
+ <p>CHANNEL: {{.Props.ChannelName}}<br>{{.Props.SenderName}} - {{.Props.Hour}}:{{.Props.Minute}} {{.Props.TimeZone}}, {{.Props.Month}} {{.Props.Day}}<br><pre style="text-align:left;font-family: 'Lato', sans-serif; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">{{.Props.PostMessage}}</pre></p>
<p style="margin: 20px 0 15px">
<a href="{{.Props.TeamLink}}" style="background: #2389D7; display: inline-block; border-radius: 3px; color: #fff; border: none; outline: none; min-width: 170px; padding: 15px 25px; font-size: 14px; font-family: inherit; cursor: pointer; -webkit-appearance: none;text-decoration: none;">Go To Channel</a>
</p>
diff --git a/api/user.go b/api/user.go
index 62947d8fd..886e38c91 100644
--- a/api/user.go
+++ b/api/user.go
@@ -661,7 +661,7 @@ func getProfiles(c *Context, w http.ResponseWriter, r *http.Request) {
profiles := result.Data.(map[string]*model.User)
for k, p := range profiles {
- options := utils.SanitizeOptions
+ options := utils.Cfg.GetSanitizeOptions()
options["passwordupdate"] = false
if c.IsSystemAdmin() {
@@ -1102,7 +1102,7 @@ func updateRoles(c *Context, w http.ResponseWriter, r *http.Request) {
}
}
- options := utils.SanitizeOptions
+ options := utils.Cfg.GetSanitizeOptions()
options["passwordupdate"] = false
ruser.Sanitize(options)
w.Write([]byte(ruser.ToJson()))
@@ -1222,7 +1222,7 @@ func UpdateActive(c *Context, user *model.User, active bool) *model.User {
}
ruser := result.Data.([2]*model.User)[0]
- options := utils.SanitizeOptions
+ options := utils.Cfg.GetSanitizeOptions()
options["passwordupdate"] = false
ruser.Sanitize(options)
return ruser
@@ -1548,7 +1548,7 @@ func updateUserNotify(c *Context, w http.ResponseWriter, r *http.Request) {
c.LogAuditWithUserId(user.Id, "")
ruser := result.Data.([2]*model.User)[0]
- options := utils.SanitizeOptions
+ options := utils.Cfg.GetSanitizeOptions()
options["passwordupdate"] = false
ruser.Sanitize(options)
w.Write([]byte(ruser.ToJson()))