From 275731578e72d2c6e12cfb2fc315d3446474faec Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 16 Jul 2018 15:49:26 -0400 Subject: MM-10254 Add plugin APIs for getting/updating user statuses (#9101) * Add plugin APIs for getting/updating user statuses * Add and update tests * Updates per feedback --- plugin/api.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugin/api.go') diff --git a/plugin/api.go b/plugin/api.go index 76df9377a..70a3e7ab5 100644 --- a/plugin/api.go +++ b/plugin/api.go @@ -49,6 +49,16 @@ type API interface { // UpdateUser updates a user. UpdateUser(user *model.User) (*model.User, *model.AppError) + // GetUserStatus will get a user's status. + GetUserStatus(userId string) (*model.Status, *model.AppError) + + // GetUserStatusesByIds will return a list of user statuses based on the provided slice of user IDs. + GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError) + + // UpdateUserStatus will set a user's status until the user, or another integration/plugin, sets it back to online. + // The status parameter can be: "online", "away", "dnd", or "offline". + UpdateUserStatus(userId, status string) (*model.Status, *model.AppError) + // CreateTeam creates a team. CreateTeam(team *model.Team) (*model.Team, *model.AppError) -- cgit v1.2.3-1-g7c22