[MM-17422] Added code to update, delete last bot_icon time in model.bot. (#12229)

Display LHS bot Icon in web app. As part of mentioned task, Added LastIconUpdate variable in model.bot to store last update time of icon. Also added code to update/delete value of the mentioned variable when setting/deleting bot icon.
Этот коммит содержится в:
Renil Joseph
2019-12-29 07:30:18 -07:00
коммит произвёл Ben Schumacher
родитель f8d31def8e
Коммит 803a58f991
6 изменённых файлов: 366 добавлений и 314 удалений

Просмотреть файл

@@ -60,7 +60,7 @@ func NewSqlUserStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface) st
}
us.usersQuery = us.getQueryBuilder().
Select("u.*", "b.UserId IS NOT NULL AS IsBot", "COALESCE(b.Description, '') AS BotDescription").
Select("u.*", "b.UserId IS NOT NULL AS IsBot", "COALESCE(b.Description, '') AS BotDescription", "COALESCE(b.LastIconUpdate, 0) AS BotLastIconUpdate").
From("Users u").
LeftJoin("Bots b ON ( b.UserId = u.Id )")