MAM Purge Protocol
The purge protocol is legacy layover for Jappix, it was the only implementation using it as far as we know. Although it's quite simple and straight away to implement... but as the draft for the MAM extension progressed to standard deleting entries in the middle of an archive became simply against the spec as it leaves the archive in an inconsistent state, so right now purging will just leave an empty marker in place of the messages which allows to remain compliant while doing the job.
For what regards the protocol, you could empty the whole archive by sending the following IQ stanza directed to the self account:
<iq type='set' id='juliet1'> <purge xmlns='http://metronome.im/protocol/mam-purge' /> </iq>
By adding attributes to the purge element you can fine grain the phasing out of entries:
- id :: to empty all messages with the following id.
- jid :: to empty all messages with the following jid.
- start :: to empty all messages from this timestamp.
- fin :: to empty all messages upto this timestamp.
All attributes are optional and can be freely used in whatever combination, timestamps use DateTime profile as explained in https://xmpp.org/extensions/xep-0082.html 3.2 paragraph.
Ex. to empty the conversation with firstname.lastname@example.org starting from 2010-07-21 at 4 am.
<iq type='set' id='romeo1'> <purge xmlns='http://metronome.im/protocol/mam-purge' jid="email@example.com" start="2010-07-21T04:00:00Z" /> </iq>