Skip to content

Commit

Permalink
Add notes about bot users to API presence documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhammond committed Dec 12, 2014
1 parent 12921b1 commit e67d266
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions page_presence.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# Presence

A user can have one of two possible presence values, `active` or `away`. A user
is active if all of the following are true:
is active if they have at least one client connected to Slack, and they are not
marked as "away". There are two ways a user can be marked as away: automatic
and manual.

* They have at least one client currently connected to Slack.
* They have performed an action in the last 30 minutes.
* They have not manually set themselves as away (see below).

If any of these conditions are false, the user is away.
## Automatic Away

The Slack message servers will automatically detect activity based on
messages sent from a client. However, it's possible to actively use a Slack
client without causing any messages to be sent; in these situations the client
should indicate activity has occured by calling the API.
messages sent from a client. If they detect no messages in 30 minutes, the
user is marked as automatically away.

Every Slack API method accepts an additional `set_active` argument. This can
be used to indicate activity has occured while performing the requested
action.
However, it's possible to actively use a Slack client without causing any
messages to be sent; in these situations the client can indicate activity has
occured by calling the API. Every Slack API method accepts an additional
`set_active` argument. This can be used to indicate activity has occured while
performing the requested action.

If the user's activity generates no API calls then the client can periodically
call [users.setActive](/methods/users.setActive) to let the Slack servers know
about that activity.

## Manually setting user presence
These auto-away rules do not apply to [Bot Users](/bot-users).

## Manual Away

An application can call [presence.set](/methods/presence.set)
to manually mark a user as `away` or `active`. A manual status set using this
Expand Down

0 comments on commit e67d266

Please sign in to comment.