Commit graph libervia-backend/sat/plugins/plugin_xep_0313.py
Author SHA1 Message Date
Goffi
6426103f12 plugin XEP-0313: on cold start (without known archive) we only request 50 last messages 2021-06-10 15:44:30 +02:00
Goffi
dc86957043 date update 2021-03-19 15:45:14 +01:00
Goffi
247589aedc plugin XEP-0431: Fulltext Search for MAM implementation 2020-12-10 10:32:54 +01:00
Goffi
f321952cbe plugin XEP-0329: added FISCreateDir method:
This method is used to create a directory for component file sharing, and optionally set
its configuration.
2020-09-17 16:42:00 +02:00
Goffi
fca70e1710 plugin XEP-0313: fix getting MAM archive when history is empty 2020-09-17 11:27:57 +02:00
Goffi
e60b64d876 plugin XEP-0313: fixed MAMGet signature 2020-09-17 10:46:13 +02:00
Goffi
e03eb5bfcc plugins XEP-0059, XEP-0060, XEP-0277, XEP-0313: better serialisation:
`data_format.serialise` is now used for `mbGet`, and RSM/MAM values are not transtyped to
strings anymore. A serialised dict is now used, items are put in the `items` key.

Comments handling has been refactored to use a list for the potentially multiple comments
nodes.

`rsm` data are now in a `rsm` key of the dict, and `mam` data are merged with other
metadata.
2020-07-16 09:07:20 +02:00
Goffi
e1a44cf4e4 fixed shebangs 2020-01-29 10:07:00 +01:00
Goffi
a39349fe64 dates update 2020-01-29 09:50:54 +01:00
Goffi
fbfe96c505 Python 3 port:
/!\ this is a huge commit
/!\ starting from this commit, SàT is needs Python 3.6+
/!\ SàT maybe be instable or some feature may not work anymore, this will improve with time

This patch port backend, bridge and frontends to Python 3.

Roughly this has been done this way:

- 2to3 tools has been applied (with python 3.7)
- all references to python2 have been replaced with python3 (notably shebangs)
- fixed files not handled by 2to3 (notably the shell script)
- several manual fixes
- fixed issues reported by Python 3 that where not handled in Python 2
- replaced "async" with "async_" when needed (it's a reserved word from Python 3.7)
- replaced zope's "implements" with @implementer decorator
- temporary hack to handle data pickled in database, as str or bytes may be returned,
  to be checked later
- fixed hash comparison for password
- removed some code which is not needed anymore with Python 3
- deactivated some code which needs to be checked (notably certificate validation)
- tested with jp, fixed reported issues until some basic commands worked
- ported Primitivus (after porting dependencies like urwid satext)
- more manual fixes
2019-08-13 19:08:41 +02:00
Goffi
633e1eb203 plugin XEP-0313: log issues in addToHistory instead of raising error 2019-07-24 07:51:48 +02:00
Goffi
6f5718a045 plugin XEP-0198: retrieve missing messages + send buffered ones on hot reconnection:
Missing one2one messages are now retrieved with MAM on hot reconnection, and buffered ones
(which have most probably not been received by the server) are resent at the end of the
reconnection workflow. IQ results are not re-sent on hot reconnection, as they don't make
sense anymore with a new session.

fix 330
2019-07-17 09:28:35 +02:00
Goffi
2dfae32542 plugin XEP-0313: fixed archive retrieval on connection:
last stanza-id is now saved for every message received, and not only retrieved from local message history anymore.
If we are the sender of a message from archive, it is only added to local history, else it is injected to normal workflow.
2019-05-03 13:00:08 +02:00
Goffi
8e338bf913 date update 2019-01-12 12:25:31 +01:00
Goffi
8f7196aafb XEP-0059: max value check:
check that max is not negative, this is to spot the accidental use of C.NO_LIMIT for max
2019-01-11 09:48:19 +01:00
Goffi
3e63d54e3d plugins XEP-0060, XEP-0313: implemented Order-By protoXEP:
new "order_by" key can be used in extra data, value can be, for now, "creation" or "modification".
2019-01-06 17:36:51 +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
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
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
744cb0c503 code style reformatting using black 2018-06-27 20:14:46 +02:00
Goffi
80ef13612b core, setup: huge cleaning:
- moved directories from src and frontends/src to sat and sat_frontends, which is the recommanded naming convention
- move twisted directory to root
- removed all hacks from setup.py, and added missing dependencies, it is now clean
- use https URL for website in setup.py
- removed "Environment :: X11 Applications :: GTK", as wix is deprecated and removed
- renamed sat.sh to sat and fixed its installation
- added python_requires to specify Python version needed
- replaced glib2reactor which use deprecated code by gtk3reactor

sat can now be installed directly from virtualenv without using --system-site-packages anymore \o/
2018-04-02 19:44:50 +02:00
Renamed from src/plugins/plugin_xep_0313.py (Browse further)