Fixed unavailable Message attributes
This commit is contained in:
parent
9e12b53c3b
commit
c06d90b7ce
@ -59,9 +59,9 @@ class Message:
|
||||
self.channels.extend(Channel(channel) for channel in data["channel"])
|
||||
self.id: str = data["id"]
|
||||
self.active: bool = data["act"]
|
||||
self.head: str = data["head"]
|
||||
self.lead: str = data["lead"]
|
||||
self.text: str = data["text"]
|
||||
self.head: str = "" if "head" not in data else data["head"]
|
||||
self.lead: str = "" if "lead" not in data else data["lead"]
|
||||
self.text: str = "" if "text" not in data else data["text"]
|
||||
self.company: Union[str, None] = data.get("company")
|
||||
self.category: Union[str, None] = data.get("category")
|
||||
self.priority: Union[int, None] = data.get("priority")
|
||||
|
Loading…
Reference in New Issue
Block a user