Add PersonalAccountView

This commit is contained in:
Joscha 2018-08-13 13:27:56 +00:00
parent 6ed513efd9
commit e60d0ba81e

View file

@ -10,7 +10,7 @@ __all__ = [
"parallel", "asyncify", "parallel", "asyncify",
"mention", "normalize", "similar", "mention", "normalize", "similar",
"format_time", "format_time_delta", "format_time", "format_time_delta",
"Session", "Listing", "Message", "Session", "PersonalAccountView", "Listing", "Message",
] ]
@ -114,6 +114,20 @@ class Session:
# account, agent or bot # account, agent or bot
return self.user_id.split(":")[0] return self.user_id.split(":")[0]
class PersonalAccountView:
def __init__(self, account_id, name, email):
self.account_id = account_id
self.name = name
self.email = email
@property
def aid(self):
return self.account_id
@aid.setter
def aid(self, new_aid):
self.account_id = new_aid
class Listing: class Listing:
def __init__(self): def __init__(self):
self._sessions = {} self._sessions = {}