summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 8d4f1a31b..974081a64 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -434,7 +434,7 @@ func (s SqlUserStore) GetEtagForDirectProfiles(userId string) StoreChannel {
result := StoreResult{}
updateAt, err := s.GetReplica().SelectInt(`
- SELECT
+ SELECT
UpdateAt
FROM
Users
@@ -454,13 +454,14 @@ func (s SqlUserStore) GetEtagForDirectProfiles(userId string) StoreChannel {
Channels.Type = 'D'
AND Channels.Id = ChannelMembers.ChannelId
AND ChannelMembers.UserId = :UserId))
- OR Id IN (SELECT
+ OR Id IN (SELECT
Name
FROM
Preferences
WHERE
UserId = :UserId
AND Category = 'direct_channel_show')
+ ORDER BY UpdateAt DESC
`, map[string]interface{}{"UserId": userId})
if err != nil {
result.Data = fmt.Sprintf("%v.%v", model.CurrentVersion, model.GetMillis())