FEATURE: User Status API (#19149)

This adds API scope for the user status. This also adds a get method to the user status controller. We didn't need a dedicated method that returns status before because the server returns status with user objects, but I think we need to provide this method for API clients.
This commit is contained in:
Andrei Prigorshnev
2022-11-24 19:16:28 +04:00
committed by GitHub
parent 9e42473af4
commit 6357a3ce33
6 changed files with 56 additions and 0 deletions

View File

@@ -4518,6 +4518,9 @@ en:
anonymize: Anonymize user accounts.
delete: Delete user accounts.
list: Get a list of users.
user_status:
read: Read user status.
update: Update user status.
email:
receive_emails: Combine this scope with the mail-receiver to process incoming emails.
badges:

View File

@@ -1037,6 +1037,7 @@ Discourse::Application.routes.draw do
post "/presence/update" => "presence#update"
get "/presence/get" => "presence#get"
get "user-status" => "user_status#get"
put "user-status" => "user_status#set"
delete "user-status" => "user_status#clear"