(self, mailbox: Dict[str, Any])
| 58 | return headers |
| 59 | |
| 60 | def _cache_mailbox(self, mailbox: Dict[str, Any]) -> None: |
| 61 | email = str(mailbox.get("email") or mailbox.get("address") or "").strip().lower() |
| 62 | token = str(mailbox.get("token") or mailbox.get("service_id") or "").strip() |
| 63 | if email: |
| 64 | self._mailboxes_by_email[email] = mailbox |
| 65 | if token: |
| 66 | self._mailboxes_by_token[token] = mailbox |
| 67 | |
| 68 | def _pick_first_value(self, payload: Dict[str, Any], *keys: str) -> str: |
| 69 | for key in keys: |