(cls, payload: dict)
| 95 | |
| 96 | @classmethod |
| 97 | def from_payload(cls, payload: dict) -> "WSNotification": |
| 98 | return cls( |
| 99 | message_id=payload.get("message_id", ""), |
| 100 | from_=payload.get("from", ""), |
| 101 | recipient=payload.get("recipient") or payload.get("to") or "", |
| 102 | subject=payload.get("subject", ""), |
| 103 | received_at=payload.get("received_at", ""), |
| 104 | conversation_id=payload.get("conversation_id"), |
| 105 | ) |
| 106 | |
| 107 | |
| 108 | def _build_ws_url(base_url: str, agent_email: str) -> str: |