Commit graph

2,726 commits

Author SHA1 Message Date
Goffi
9c95044cb8 plugin OTR: catch and log potr.context.ErrorReceived instead of raising it. 2018-12-26 17:18:52 +01:00
Goffi
3515defd64 plugin XEP-0198: abort connection if ack is not received after a timeout:
If ack is not received after a given time (currently 25s), connection is aborted.
This avoid waiting forever when TCP link is lost (i.e. switching from cable to wifi), and allows to use resuming mechanism.
2018-12-26 14:37:13 +01:00
Goffi
bea35db274 plugin XEP-0045: don't loop when initiating MAM archive 2018-12-12 08:58:52 +01:00
Goffi
8cc39ea3a5 plugin XEP-0045: request 50 *last* MAM messages if new archive 2018-12-12 01:13:15 +01:00
Goffi
0e70587857 core (memory/sqlite): further improvments in update_v7:
- "info" messages deletion is now done by deactivating foreign keys. This seriously boost performances.
- "VACUUM" is done at the end to reduce database size.
2018-12-12 00:53:14 +01:00
Goffi
82d16029b8 core (memory/sqlite): fixed v7 update performance issue:
Performance issue was due to bad ordering in table dropping, this has been fixed.
"infos" message are also deleted by this update as they are containing only presence data and take a lot of space for a barely useful data.
A config option may be available in the future to store presence data in logs.
2018-12-11 23:53:27 +01:00
Goffi
51bc3411ba core (memory/sqlite): do not call commitStatements if there is nothing to commit in checkUpdates 2018-12-10 21:06:20 +01:00
Goffi
1a9e8d8cb1 jp (message/mam): display metadata when verbose 2018-12-10 20:34:45 +01:00
Goffi
c77bc72490 plugin XEP-0313, XEP-0045: loop MAM requests until whole archive is retrieved:
- plugin xep-0313: new serialise method
-                : getArchives now returns an extra mam_response dict with "complete" and "stable" status
-                : MAMGet now return a new metadata dict before profile (with serialised RSM and MAM response)
2018-12-10 20:34:45 +01:00
Goffi
97915f0fbe plugin XEP-0059: added serialise method 2018-12-10 20:34:45 +01:00
Goffi
c2d7c3e69e core (memory/sqlite): changed history constraint
/!\ Database schema change /!\
History was using a unique constraint on `profile_id, timestamp, source, dest, source_res, dest_res`, which can cause trouble because several messages send quickly by the same person can have a common timestamp (specially with delayed messages where precision is second), resulting in message loss.
The new constraint use `profile_id, stanza_id, source, dest` where `stanza_id` is XEP-0359 stanza_id, so it's unique by definition, and no message should be lost anymore.
Because sqlite doesn't support altering table with a constraint change, we have to create new tables and copy old data to new one, which can be pretty long.
Sqlite update mechanism with "specifics" has been fixed when several updates are applied (e.g. moving from v5 to v7) and a specific is in the workflow.
2018-12-09 14:07:26 +01:00
Goffi
35e15c664c plugin XEP-0045: MAM implementation for MUC 2018-12-07 19:13:28 +01:00
Goffi
7e79203fa0 core (xmpp): check <message> namespace in parseMessage, and accept empty namespace (happen with Wokkel) 2018-12-07 17:46:50 +01:00
Goffi
6bb1b599ab plugin XEP-0313: improvments to prepare MUC MAM:
- discard groupchat message when retrieving last stanza_id on connection
- service can be specified in getMessageFromResult
- service is also used when using getArchives from bridge
2018-12-07 17:43:43 +01:00
Goffi
13cfba0f8a core (memory/disco): normalise booleans in extensions 2018-12-01 14:40:32 +01:00
Goffi
a245e32391 core (memory/sqlite): skip a line before debug log showing statements 2018-12-01 14:39:35 +01:00
Goffi
bd7ae59674 jp (info/disco): better default output for extensions 2018-12-01 14:35:28 +01:00
Goffi
f83e4f3334 tools (common/data_format): use "default" in json.dumps in serialise (useful notably to serialise jid.JID) 2018-12-01 14:34:55 +01:00
Goffi
51fef1d271 jp (message): new mam subcommand:
this subcommand allow to retrieve message history from MAM archive.
Note that the name may change in the future, it can be integrated to a "message/get" or "message/log" command.
2018-12-01 10:48:01 +01:00
Goffi
c4997f690c jp (output): new OUTPUT_MESS output to handle data containing chat messages 2018-12-01 10:48:01 +01:00
Goffi
93b23f1cc8 jp (base): pubsub legacy --max option renamed to --max-item to prepare the use of --max for RSM. 2018-12-01 10:47:59 +01:00
Goffi
32af40e098 jp (base): new own_jid host attribute:
this attribute is None by default and must be filled at runtime if needed by a command.
2018-12-01 10:42:25 +01:00
Goffi
31eae6db71 jp (base): new date_decoder to specify dates in arguments 2018-12-01 10:41:37 +01:00
Goffi
4b81275fdf tools (common/date_utils): date_parse_ext + timezone handling:
- new date_parse_ext method parse a date where relative informations can be added. e.g.: "1 week ago", "now - 2 days", "01/01/01 01:01 + 3 hours".
- new TZ_UTC and TZ_LOCAL constants can be used to use UTC time or local time zone.
- date_parse* can now use a default_tz, which will be used if timezone if not specified in date format (default UTC).
- tz_info can now be used in date_format to format the time in given timezone (default: UTC).
2018-12-01 10:40:19 +01:00
Goffi
8e27547531 plugin XEP-0060: use new parseExtra methods from MAM and RSM 2018-12-01 10:34:42 +01:00
Goffi
39d2409273 plugin XEP-0313: implementation of MAM for messages:
- (core/xmpp): new messageGetBridgeArgs to easily retrieve arguments used in bridge from message data
-            : parseMessage is not static anymore
-            : new "message_parse" trigger point
- (xep-0313) : new "MAMGet" bridge method to retrieve history from MAM instead of local one
-            : on profileConnected, if previous MAM message is found (i.e. message with a stanza_id), message received while offline are retrieved and injected in message workflow.
               In other words, one2one history is synchronised on connection.
-            : new "parseExtra" method which parse MAM (and optionally RSM) option from extra dictionary used in bridge.
2018-12-01 10:33:43 +01:00
Goffi
7d82242b74 plugin XEP-0059: added "parseExtra" method to easily handle RSM argument coming from bridge. 2018-12-01 10:10:25 +01:00
Goffi
0b8e750956 core (memory/sqlite): added stanza_id:
/!\ database schema change /!\
stanza_id is a new field in history added to prepare the implementation of MAM for messages.
A new "last_stanza_id" can be used in filters to retrieve last message with a know stanza id (useful for history synchronisation).
2018-12-01 10:08:17 +01:00
Goffi
a29893ac1f core: minor style/typos fixes 2018-12-01 10:04:17 +01:00
Goffi
af64d24d52 tools (common/data_format): serialise now check types and return a default value when empty string is parsed. 2018-12-01 09:59:48 +01:00
Goffi
c18a40e7cc plugin XEP-0359: Unique and Stable Stanza IDs implementation, first draft 2018-12-01 09:57:25 +01:00
Goffi
f6d55c4603 core: fixed reactor crash by installing reactor only in makeService 2018-11-19 23:46:50 +01:00
Goffi
ed049c7a9d core: removed whitespace ping (not needed anymore as we handle XMPP ping) 2018-11-19 21:08:25 +01:00
Goffi
a8922b0e46 core (xmpp): added NS_X_DATA to disco features 2018-11-18 15:49:59 +01:00
Goffi
cee59f42ae jp (base): fixed connection when start_session arg exists but is False 2018-11-18 15:49:55 +01:00
Goffi
05b59775d0 plugin XEP-0198: Stream Management implementation:
- hooks can now be set in stream onElement and send methods
- xmllog refactored to use new hooks
- client.isConnected now uses transport.connected method
- fixed reconnection, SàT will now try to reconnect indefinitely until it success, unresolvable failure happen (e.g. invalid certificate), or explicit disconnection is requested (or a plugin change this behaviour)
- new triggers: "stream_hooks", "disconnecting", "disconnected", and "xml_init" (replace "XML Initialized")
2018-11-18 15:49:46 +01:00
Goffi
604238e035 jp: new command "ping" 2018-11-10 10:16:38 +01:00
Goffi
3a07122da9 plugin XEP-0199: implementation of XMPP Ping 2018-11-10 10:16:38 +01:00
Goffi
d590de6373 core (xmpp): added missing disco#info namespace to disco info result. 2018-11-10 10:16:38 +01:00
Goffi
1b8345f4af core (xmpp): server certificate validation:
XMPP server certificate is now checked, and connection is refused (by default) if it's not valid.
Certificate check can be disabled in the new parameter "Configuration/check_certificate".
If certificate checking is disabled, a warning note is sent on every new connection.
Twisted and Wokkel are temporarly monkey patched in sat.core.tls_patches module, until modifications are merged upstream.
2018-11-10 10:16:35 +01:00
Goffi
867f58cd4e quick frontend (contact list): use property to retrieve "whoami" in ProfileContactList:
this avoid a crash introduced by early creation of contact list during profile plugging, and avoid desynchronisation risk.
2018-11-09 16:17:45 +01:00
Goffi
154ba0d349 quick frontend (app): create the contact list immediatly on plug
This avoid crash when contact list is used while connexion is not done yet or not possible (e.g. server unavailable).
2018-11-05 09:13:05 +01:00
Goffi
18a4d3d544 core: fixed package name for Android 2018-10-05 13:42:06 +02:00
Goffi
bcab68049a template: better css files order 2018-10-03 20:38:10 +02:00
Goffi
c7698c5057 plugin identity: fixed nick when there is no user part in entity 2018-10-03 20:37:12 +02:00
Goffi
86a52e58a6 jp (info): replaced "Client" by the more generic "Software" 2018-09-27 08:51:01 +02:00
Goffi
2d37dc64e9 template: fixed by variable used in css_files_noscript 2018-09-27 08:50:38 +02:00
Goffi
9771affbcc install: don't do conditional requirement for omemo anymore, it should now work on all unixes 2018-09-23 17:02:47 +02:00
Goffi
c1994b853f doc: CHANGELOG update 2018-09-20 19:52:47 +02:00
Goffi
465ba81bc2 install: use omemo in install_requires only for platforms supported upstream 2018-09-20 19:04:02 +02:00