refactor: improve key transport message handling and deduplicate errors

Centralize heartbeat detection and have a function for error to string
mapping. So we don't need the same code in multiple handlers.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
Michael Vetter
2026-03-22 17:36:41 +01:00
parent e4bfda2f8a
commit a824b26008
4 changed files with 26 additions and 61 deletions

View File

@@ -1147,6 +1147,7 @@ omemo_on_message_recv(const char* const from_jid, uint32_t sid,
if (payload == NULL) {
signal_buffer_free(plaintext_key);
*error = OMEMO_ERR_KEY_TRANSPORT;
return NULL;
}