#1524 Configure MAM to only store real messages

Reporter kousu
Owner Nobody
Stars ★ (1)
  • Priority-Medium
  • Status-Duplicate
  • Type-Enhancement
  1. kousu on

    Description of feature: I would like mod_mam to have a setting to only store messages with <body>s. The rules from https://prosody.im/doc/modules/mod_csi_simple could be applied to minimize the storage and traffic needed. I suppose any encrypted messages will not be filterable because you can't distinguish a message from a chatstate (though maybe you could guess from the packet size) which is unfortunate, but anything would be an improvement. Motivation: My archive is large and takes a long time to sync (c.f. https://issues.prosody.im/1523) and it seems that the majority of stanzas being synced are actually these chatstate or chatmarker stanzas which are useless after the fact: <message to='nick@kousu.ca/dino.106396'> <result id='dlohRwioq14X-x2T' xmlns='urn:xmpp:mam:2'> <forwarded xmlns='urn:xmpp:forward:0'> <delay xmlns='urn:xmpp:delay' stamp='[....]' /> <message id='c9e0f964-cef9-4b6e-b048-cb90c5367b4e' type='chat' to='[....]' xmlns='jabber:client' from='nick@kousu.ca/dino.7676da65'> <composing xmlns='http://jabber.org/protocol/chatstates' /> </message> </forwarded> </result> </message> <message to='nick@kousu.ca/dino.106396'> <result id='_-Js0pzvHIxNFrYb' xmlns='urn:xmpp:mam:2'> <forwarded xmlns='urn:xmpp:forward:0'> <delay xmlns='urn:xmpp:delay' stamp='[....]' /> <message to='nick@kousu.ca/dino.7676da65' xmlns='jabber:client' type='chat' from='[....]'> <received xmlns='urn:xmpp:chat-markers:0' id='5c34899e-3feb-4538-8e14-63d44b57441e' /> <received xmlns='urn:xmpp:receipts' id='5c34899e-3feb-4538-8e14-63d44b57441e' /> <store xmlns='urn:xmpp:hints' /> </message> </forwarded> </result> </message>

  2. Zash on

    Duplicate of #763

    • tags Status-Duplicate

New comment

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