Commit 8d5474af authored by Philipp Hörist's avatar Philipp Hörist

MUCData: Add propertys

parent fdfb0864
...@@ -216,6 +216,30 @@ class MUCJoinedState(Enum): ...@@ -216,6 +216,30 @@ class MUCJoinedState(Enum):
def __str__(self): def __str__(self):
return self.name return self.name
@property
def is_joined(self):
return self == MUCJoinedState.JOINED
@property
def is_not_joined(self):
return self == MUCJoinedState.NOT_JOINED
@property
def is_joining(self):
return self == MUCJoinedState.JOINING
@property
def is_creating(self):
return self == MUCJoinedState.CREATING
@property
def is_captcha_request(self):
return self == MUCJoinedState.CAPTCHA_REQUEST
@property
def is_captcha_failed(self):
return self == MUCJoinedState.CAPTCHA_FAILED
class ClientState(IntEnum): class ClientState(IntEnum):
DISCONNECTING = 0 DISCONNECTING = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment