Skip to content

Draft: Refactor handle message

The handle-message control flow was hard to follow, and was a bit intimidating to add functionality to.

This MR factors a context interpretation function out and uses it to straighten out the control flow.

Additionally, a missing from attribute, as well as one other kind of known-bad stanza will now result in an error stanza instead of a panic.

Please carefully review the infer_incoming_message_context function, as I'm not 100% sure I got the logic copied over right.

Marked as "draft" until I try it out in Dergchat to see if it works against a real Prosody server.

Edited by Werner Kroneman

Merge request reports