summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-07-27 17:04:44 -0400
committerJoramWilander <jwawilander@gmail.com>2015-07-27 17:04:44 -0400
commite122b31db1306bf42b1c0265a1f0a57e43153e54 (patch)
tree915354bfb43c563c7013ebbb97482f17586873eb /store/sql_user_store.go
parent62db88ed456148750cd6990ffc02e660af53ef91 (diff)
downloadchat-e122b31db1306bf42b1c0265a1f0a57e43153e54.tar.gz
chat-e122b31db1306bf42b1c0265a1f0a57e43153e54.tar.bz2
chat-e122b31db1306bf42b1c0265a1f0a57e43153e54.zip
fixes some database queries that broke with postgres, fixes the unread/new mesasge issues
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 0228fa308..cd63e95b8 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -184,7 +184,7 @@ func (us SqlUserStore) UpdateLastPictureUpdate(userId string) StoreChannel {
curTime := model.GetMillis()
- if _, err := us.GetMaster().Exec("UPDATE Users SET LastPictureUpdate = ?, UpdateAt = ? WHERE Id = ?", curTime, curTime, userId); err != nil {
+ if _, err := us.GetMaster().Exec("UPDATE Users SET LastPictureUpdate = :Time, UpdateAt = :Time WHERE Id = :UserId", map[string]interface{}{"Time": curTime, "UserId": userId}); err != nil {
result.Err = model.NewAppError("SqlUserStore.UpdateUpdateAt", "We couldn't update the update_at", "user_id="+userId)
} else {
result.Data = userId