diff options
author | nickago <ngonella@calpoly.edu> | 2015-07-09 16:37:03 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-07-13 08:58:51 -0700 |
commit | c3aed620316241eba48ecd2fd1f36a309bcfdff9 (patch) | |
tree | 0bb97f7ad036986fe4b7b0e35d9cbf39c740a067 /store/sql_user_store.go | |
parent | 6cc8788193630b802375669c72fab02220cb692a (diff) | |
download | chat-c3aed620316241eba48ecd2fd1f36a309bcfdff9.tar.gz chat-c3aed620316241eba48ecd2fd1f36a309bcfdff9.tar.bz2 chat-c3aed620316241eba48ecd2fd1f36a309bcfdff9.zip |
Added timestamps to pictures to stop caching
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r-- | store/sql_user_store.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go index fc3d125c4..77470946c 100644 --- a/store/sql_user_store.go +++ b/store/sql_user_store.go @@ -150,6 +150,25 @@ func (us SqlUserStore) Update(user *model.User, allowActiveUpdate bool) StoreCha return storeChannel } +func (us SqlUserStore) UpdateUpdateAt(userId string) StoreChannel { + storeChannel := make(StoreChannel) + + go func() { + result := StoreResult{} + + if _, err := us.GetMaster().Exec("UPDATE Users SET UpdateAt = ? WHERE Id = ?", model.GetMillis(), userId); err != nil { + result.Err = model.NewAppError("SqlUserStore.UpdateUpdateAt", "We couldn't update the update_at", "user_id="+userId) + } else { + result.Data = userId + } + + storeChannel <- result + close(storeChannel) + }() + + return storeChannel +} + func (us SqlUserStore) UpdateLastPingAt(userId string, time int64) StoreChannel { storeChannel := make(StoreChannel) |