diff --git a/src/pyrmv/classes/message.py b/src/pyrmv/classes/message.py index e7eaa2c..7063e0f 100644 --- a/src/pyrmv/classes/message.py +++ b/src/pyrmv/classes/message.py @@ -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")