Use strings instead of opaque magic-number constants for presence states; rename AWAY to UNAVAILABLE

This commit is contained in:
Paul "LeoNerd" Evans 2014-08-13 14:31:48 +01:00
parent 2a0f7541c7
commit 55944ccf72
7 changed files with 34 additions and 37 deletions

View file

@ -37,7 +37,7 @@ class Feedback(object):
class PresenceState(object):
"""Represents the presence state of a user."""
OFFLINE = 0
BUSY = 1
ONLINE = 2
FREE_FOR_CHAT = 3
OFFLINE = u"offline"
UNAVAILABLE = u"unavailable"
ONLINE = u"online"
FREE_FOR_CHAT = u"free_for_chat"