This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37819b4
commit 5d9d680
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"desc": "Gets user presence information.", | ||
|
||
"args": { | ||
"user": { | ||
"required" : true, | ||
"type" : "user", | ||
"desc" : "User to get presence info on. Defaults to the authed user." | ||
} | ||
}, | ||
|
||
"errors": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
This method lets you find out information about a user's presence. | ||
[Consult the presence documentation](/docs/presence) for more details. | ||
|
||
## Arguments | ||
|
||
{ARGS} | ||
|
||
## Response | ||
|
||
When requesting information for a different user, this method just returns the | ||
current presence (either `active` or `away`): | ||
|
||
{ | ||
"ok": true, | ||
"presence": "active", | ||
} | ||
|
||
If you are requesting presence information for the authed user, this method returns | ||
the current presence, along with details on how it was calculated: | ||
|
||
{ | ||
"ok": true, | ||
"presence": "active", | ||
"online": true, | ||
"auto_away": false, | ||
"manual_away": false, | ||
"connection_count": 1, | ||
"last_activity": 1419027078 | ||
} | ||
|
||
`presence` indicates the user's overall presence, it will either be `active` or `away`. | ||
|
||
`online` will be true if they have a client currently connected to Slack. `auto_away` will be true if our servers haven't detected any activity from the user in the last 30 minutes. `manual_away` will be true if the user has manually set their presence to `away`. | ||
|
||
`connection_count` gives a count of total connections. | ||
|
||
`last_activity` indicates the last activity seen by our servers. If a user has no connected clients then this property will be absent. | ||
|
||
## Errors | ||
|
||
{ERRORS} |