summaryrefslogtreecommitdiffstats
path: root/store/store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-18 11:10:03 -0400
committerGitHub <noreply@github.com>2016-07-18 11:10:03 -0400
commitc0ab2636d699c8544ce03a58f61b95cfd66ff7ce (patch)
treec7d07934e0ff1a75aafb097a184ae150888199c0 /store/store.go
parent180adc79af3d14de6ce62f6e687a6735db3fe82f (diff)
downloadchat-c0ab2636d699c8544ce03a58f61b95cfd66ff7ce.tar.gz
chat-c0ab2636d699c8544ce03a58f61b95cfd66ff7ce.tar.bz2
chat-c0ab2636d699c8544ce03a58f61b95cfd66ff7ce.zip
PLT-2241 Refactored statuses into a more real-time system (#3573)
* Refactored statuses into a more real-time system * Updated package.json with correct commit and fixed minor bug * Minor updates to statuses based on feedback * When setting status online, update only LastActivityAt if status already exists
Diffstat (limited to 'store/store.go')
-rw-r--r--store/store.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/store/store.go b/store/store.go
index 4b5c0e8cd..c495ff927 100644
--- a/store/store.go
+++ b/store/store.go
@@ -43,6 +43,7 @@ type Store interface {
License() LicenseStore
PasswordRecovery() PasswordRecoveryStore
Emoji() EmojiStore
+ Status() StatusStore
MarkSystemRanUnitTests()
Close()
DropAllTables()
@@ -126,9 +127,6 @@ type UserStore interface {
Update(user *model.User, allowRoleUpdate bool) StoreChannel
UpdateLastPictureUpdate(userId string) StoreChannel
UpdateUpdateAt(userId string) StoreChannel
- UpdateLastPingAt(userId string, time int64) StoreChannel
- UpdateLastActivityAt(userId string, time int64) StoreChannel
- UpdateUserAndSessionActivity(userId string, sessionId string, time int64) StoreChannel
UpdatePassword(userId, newPassword string) StoreChannel
UpdateAuthData(userId string, service string, authData *string, email string) StoreChannel
UpdateMfaSecret(userId, secret string) StoreChannel
@@ -150,7 +148,6 @@ type UserStore interface {
GetEtagForDirectProfiles(userId string) StoreChannel
UpdateFailedPasswordAttempts(userId string, attempts int) StoreChannel
GetTotalUsersCount() StoreChannel
- GetTotalActiveUsersCount() StoreChannel
GetSystemAdminProfiles() StoreChannel
PermanentDelete(userId string) StoreChannel
AnalyticsUniqueUserCount(teamId string) StoreChannel
@@ -264,3 +261,12 @@ type EmojiStore interface {
GetAll() StoreChannel
Delete(id string, time int64) StoreChannel
}
+
+type StatusStore interface {
+ SaveOrUpdate(status *model.Status) StoreChannel
+ Get(userId string) StoreChannel
+ GetOnlineAway() StoreChannel
+ ResetAll() StoreChannel
+ GetTotalActiveUsersCount() StoreChannel
+ UpdateLastActivityAt(userId string, lastActivityAt int64) StoreChannel
+}