[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 удалений

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

@@ -87,6 +87,7 @@ type User struct {
LastActivityAt int64 `db:"-" json:"last_activity_at,omitempty"`
IsBot bool `db:"-" json:"is_bot,omitempty"`
BotDescription string `db:"-" json:"bot_description,omitempty"`
BotLastIconUpdate int64 `db:"-" json:"bot_last_icon_update,omitempty"`
TermsOfServiceId string `db:"-" json:"terms_of_service_id,omitempty"`
TermsOfServiceCreateAt int64 `db:"-" json:"terms_of_service_create_at,omitempty"`
}
@@ -487,7 +488,7 @@ func (u *UserAuth) ToJson() string {
// Generate a valid strong etag so the browser can cache the results
func (u *User) Etag(showFullName, showEmail bool) string {
return Etag(u.Id, u.UpdateAt, u.TermsOfServiceId, u.TermsOfServiceCreateAt, showFullName, showEmail)
return Etag(u.Id, u.UpdateAt, u.TermsOfServiceId, u.TermsOfServiceCreateAt, showFullName, showEmail, u.BotLastIconUpdate)
}
// Remove any private data from the user object