#922 mod_watchregistration does not reset stanza builder to the top tag

Reporter Link Mauve
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Milestone-0.9
  • Type-Defect
  • Status-Fixed
  1. Link Mauve on

    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="linkmauve@jabberfr.org" type="chat"><body>something something<stanza-id xmlns="urn:xmpp:sid:0" by="linkmauve@jabberfr.org" id="2017-05-21-e1b3c7ec269a5591" /></body><delay xmlns="urn:xmpp:delay" from="jabberfr.org" stamp="2017-05-21T18:26:12Z" /></message>

  2. Link Mauve on

    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.

  3. Zash on

    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.

    Changes
    • owner Zash
    • title stanza-id payload put at the wrong place for delayed messages mod_watchregistration does not reset stanza builder to the top tag
    • tags Status-Accepted Milestone-0.9
  4. Link Mauve on

    Have a patch: https://prosody.im/pastebin/46668d63-b636-421f-9bc3-8eb81365b69c

  5. Zash on

    Thanks

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.