For MUCs on the blacklist we do a deduplication not depending on
stanza-id
This patch is only for current Prosody 0.10 stable and the mod_mam_muc
module which does not add stanza-id to the messages.
This can be removed once Prosody 0.11 hits or the module is updated
prosody includes the supplied queryid in the `<fin>` tag, but this is not XEP compliant.
We set the queryid attr so we can match the MAM Messages to our query.
Thats the only purpose, it is not used to identify the iq result at the end of the query.
For that purpose is the `id` attr on the `<iq>` node.
So dont try to parse `queryid` from the `<fin>` tag.
- Condition type = groupchat is not needed because we drop messages
type groupchat that come from the user archive. To get these messages
we will query the MUC.
- Because of this the logging method save_if_not_exists() can be much
simpler
- Refactor and clean up code around MamMessageReceivedEvent
- Goal is to add a GcMamMessageReceivedEvent later on
- For that cause added a raw-mam-message-received base event