#922 mod_watchregistration does not reset stanza builder to the top tag
What steps will reproduce the problem?
1. Enable mod_mam.
2. Receive a delayed message (here from mod_watchregistration).
What is the expected output? What do you see instead?
I should get a message with a <stanza-id/> payload. Instead the <stanza-id/> is in the <body/> payload.
What version of the product are you using? On what operating system?
Prosody 0.10 commit 3e443d6791e6, on Lua 5.1 on ArchLinux.
Please provide any additional information below.
Here is the stanza I receive: <message xmlns="jabber:client" from="jabberfr.org" to="email@example.com" type="chat"><body>something something<stanza-id xmlns="urn:xmpp:sid:0" by="firstname.lastname@example.org" id="2017-05-21-e1b3c7ec269a5591" /></body><delay xmlns="urn:xmpp:delay" from="jabberfr.org"
Correction, it doesn’t depend on whether it’s a delay message or not, and it doesn’t happen when I send a message from my other client, it’s probably an interaction between mod_watchregistration and mod_mam.
mod_watchregistration seems to leave the stanza with the body element as the "last added" element, so later changes will be relative to that. I think that's the problem, not mod_mam. Other modules should be able to count on the stanza builder pointing to the top tag when it receives them, and they should leave them in that state as well.
titlestanza-id payload put at the wrong place for delayed messages