Commit Graph

24 Commits

Author SHA1 Message Date
Philipp Hörist 77dc975023 Only test if MUCs are on the blacklist 2018-03-24 10:52:16 +01:00
Philipp Hörist 9314a0543b Add non-compliant mam:2 MUCs to blacklist
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
2018-03-24 01:47:03 +01:00
Philipp Hörist 77be67f6a8 Only use fallback duplicate search on MAM < 2 2018-02-25 22:02:39 +01:00
Philipp Hörist 4c545be737 Inlcude account for message deduplication
It was not possible to write with 2 different accounts into the
same MUC
2018-01-25 00:47:00 +01:00
Philipp Hörist 5ef1813405 Fix parsing MAM IQs
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.
2018-01-17 23:57:49 +01:00
Philipp Hörist c45d0f5b27 Query MUC archives with the correct namespace 2017-11-19 23:45:03 +01:00
Philipp Hörist 44bb8e374d Request one day history when first joining MUCs 2017-11-19 19:36:26 +01:00
Philipp Hörist 51c0a05ac9 Parse from jid correctly 2017-11-19 19:36:26 +01:00
Philipp Hörist f57ec2fa34 Move common code out of HistoryWindow
- move it into message_archiving.py
2017-11-19 19:36:26 +01:00
Philipp Hörist 40f537cda9 Save last archive timestamps in DB
- A Migration from last_mam_id config value is included
2017-11-19 19:36:26 +01:00
Philipp Hörist 95357361bf Save account_id in logs table 2017-11-19 19:36:25 +01:00
Philipp Hörist 536a504f69 Remove Support for mam:0 2017-11-19 19:36:25 +01:00
Philipp Hörist 75b1d54b4c Add MAM for MUCs 2017-11-19 19:36:20 +01:00
Philipp Hörist 7f1a839e77 Deduplicate GC and MAM Messages based on stanza-id
- Add methods to determine the unique/stable id
- Write the id to the stanza_id DB field
- Add method to deduplicate based on the unique/stable id
2017-11-07 20:39:36 +01:00
Philipp Hörist 3c823d307d Save oob data also on MAM Messages
- add get_oob_data() so we can use it on more than one event
- also remove a forgotten print call
2017-11-04 13:51:12 +01:00
André Apitzsch 89c7eb6e6a Rename gajim.common.gajim to avoid name conflicts 2017-08-18 20:03:20 +02:00
André Apitzsch efec098aef Use absolute imports 2017-08-18 19:48:48 +02:00
Philipp Hörist 1f5e927ca6 Use new DB methods for MAM Messages
- also push a new MamDecryptedMessageReceived
event after disco instead of writing directly to the DB
2017-08-01 21:39:11 +02:00
Philipp Hörist 81566df8a1 Fix some regressions with MAM
- On single messages use the bare JID for DB querys
- Add more debug logging
- Some light refactoring
2017-07-30 23:04:50 +02:00
Philipp Hörist 9ff601d03b Remove XEP-0136 support 2017-07-28 00:07:49 +02:00
Philipp Hörist f449acd815 Refactor MamDecryptedMessageReceivedEvent
- 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
2017-07-27 21:46:19 +02:00
Philipp Hörist 33a51f3180 Preparation for MUC Archive querys
- 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
2017-07-25 21:01:18 +02:00
Philipp Hörist 85d220c80e Add Synchronise History Dialog
- On first contact with the MAM Archive only request 7 days
- To sync the rest of the archive the new Dialog can be used.
2017-07-25 21:00:20 +02:00
André Apitzsch 125ce523e4 Rename src directory 2017-07-02 17:25:47 +02:00
Renamed from src/common/message_archiving.py (Browse further)