Commit graph

2,794 commits

Author SHA1 Message Date
Goffi
198db6c2ca plugin XEP-0045: fixed crash when <delay> is used at an unexpected time. 2019-01-26 20:07:45 +01:00
Goffi
8a59034935 plugin mr mercurial, tools(common/utils): moved command protocol to a new module 2019-01-25 09:06:29 +01:00
Goffi
687ef5b6bd quick frontend (chat): use right type in getOrCreateWidget on new message 2019-01-22 18:52:16 +01:00
Goffi
51cd3ce52a core (findByFeatures): fixed services discovery 2019-01-20 18:20:55 +01:00
Goffi
c16292b2b5 quick frontends: visible_widgets can now keep any kind of widget, new visible_quick_widgets only iters on QuickWidgets 2019-01-20 15:46:32 +01:00
Goffi
2396f623aa quick frontend (app): fixed filtering for chat state notifications 2019-01-19 23:27:59 +01:00
Goffi
db6a38c4fb quick frontend (chat): fixed use of old method printInfo 2019-01-19 23:27:22 +01:00
Goffi
d159b9fb49 memory (sqlite): optimizations
indexes were missing on foreign keys for "message", "subject" and "thread" tables, seriously impacting performances.
In addition to those indexes, two indexes have been added to speed ordering by timestamp on "history", and one on "files" table.
history.rowid is not used anymore as there is an index on (profile_id, received_timestamp) which will speed up the query.
Primary keys order has been changed to use automatic index in most common cases (filtering by profile_id then namespace).
2019-01-19 22:49:32 +01:00
Goffi
8f9235e661 plugin text syntaxes: handle empty content in cleanXHTML + don't use self-closing tags for non-void elements. 2019-01-19 11:39:02 +01:00
Goffi
9cfbbce2d1 merge_requests: use XHTML for body 2019-01-19 11:39:02 +01:00
Goffi
b385a19b75 plugin pubsub schema: handle XHTML fields 2019-01-19 11:39:02 +01:00
Goffi
37ea73b19f frontends, jp, templates: added XHTMLBox widget:
for jp, the XHTML is rendered for now using markdown.
2019-01-19 11:39:02 +01:00
Goffi
87871fabca core (XMLUI): new XHTMLBox widget:
XHTMLBox is a textbox specialised in XHTML, i.e. it renders the XHTML when in read_only, and it allows to edit it.
The XHTML is cleaned by default, the cleaning is done by Text Syntaxes plugin (actually there is a cleaning method which can be set by any plugin, but Text Syntaxes is the one which does it).
2019-01-19 11:39:02 +01:00
Goffi
db0b00557a plugin text syntaxes: cleanStyle is an independent method, cleanXHTML is now blocking (no need to launch thread for that) 2019-01-19 11:39:02 +01:00
Goffi
f1c0eca9ab plugin text syntaxes: changed import name to TEXT_SYNTAX (better with underscore for autocompletion) 2019-01-19 11:39:02 +01:00
Goffi
604ff498da changelog: update 2019-01-19 11:38:54 +01:00
Goffi
e2ab5e33c8 core, XEP-0315: move XML element handling to sat_tmp:
XML Element is now implemented in sat_tmp, so it can be available also for SàT Pubsub.
The XEP-0315 is thus not needed anymore and have been removed, XEP-0315 namespace has been added to base disco features.
Use the new install() function of sat_tmp to do the patching.
2019-01-16 09:18:16 +01:00
Goffi
bbdf716d93 jp (pubsub): new "transform" command:
This command allows to pass all requested items through an external command to filter them (i.e. modify their content).
- created new jp.xml_tools module with some common functions (like lxml parsing)
- new EXIT code EXIT_CMD_ERROR (used when a third party utility returns an error)
2019-01-15 08:51:56 +01:00
Goffi
7e9ebc84a7 plugin pubsub admin: pubsub administrator first draft:
This experimental protocol allows to publish items where publishers can be specified.
2019-01-15 08:51:54 +01:00
Goffi
0dad996942 jp (base): fixed default values for --max-items and --max when using pubsub 2019-01-12 16:50:58 +01:00
Goffi
9ad46b42f2 plugin pubsub schema: code formatting minor update 2019-01-12 16:50:13 +01:00
Goffi
4fe4d9a5f1 jp (pubsub/search): fixed name for node_max 2019-01-12 16:49:23 +01:00
Goffi
7e0038ba13 plugin XEP-0315: implementation of Data Forms XML Element 2019-01-12 15:01:20 +01:00
Goffi
8e338bf913 date update 2019-01-12 12:25:31 +01:00
Goffi
6f4c7bd950 tools (common/data_objects): moved BlogItems._parseMetadata to a parsePubSubMetadata function, so it can be used in a more generic way 2019-01-11 21:38:20 +01:00
Goffi
173e192526 plugin XEP-0060: set a 30s timeout on items get 2019-01-11 19:49:01 +01:00
Goffi
180b4790bf core (disco): client.disco.requestInfo failure are re-raised:
so far, requestInfo failure where logged as a warning, and an empty disco was returned.
This prevented the requesting entity to know about the error, so now the error is logged and re-raised.
CancelError are converted to TimeoutError (requestInfo is only cancelled on timeout).
An empty disco is still cached in case of failure, to avoid re-waiting for the entity on next request.
2019-01-11 19:48:20 +01:00
Goffi
c5a17cc9ef core: findByFeatures speed improvments:
- DeferredList are used instead of waiting for each disco individually
- a Timeout of 10 s is set for jids, to avoid waiting for minutes when some entity is unreachable (which leads to terrible user experience while waiting for a discovery page)
2019-01-11 19:44:46 +01:00
Goffi
d88d2a7d8f tools (common/data_objects): metadata parsing in BlogItems:
metadata are parsed to deserialise some well known values like rsm index and count, and some properties have been added to have easier access.
A "complete" property (or item in metadata) is set to True if we are on the last page, False if we are not, or None if we don't have enough data to know if we are on the last page or not.
2019-01-11 16:35:13 +01:00
Goffi
7a9ee35cfc misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext) 2019-01-11 11:13:15 +01:00
Goffi
fa0179f87e jp (base): MAM and RSM arguments can now be used for pubsub commands:
- RSM and MAM args arguments have been added to pubsub group, and activated when multiple items are possible
- /!\ --max-items (i.e. pubsub original max) short option has been change for -M, and -m is now used for RSM max
- pubsub/search -m option has been renamed -M for same reason as above
- pubsub/search -o option has been replaced by -k (for keep), to avoid conflict with order-by (and long version is now --node-max)
2019-01-11 10:18:02 +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
b33d1f66de core (XMLUI): small optimisation: introspection is done once at module loading instead of on each XMLUI instantiation 2019-01-11 09:48:17 +01:00
Goffi
169165e4ee jp (base, pubsub, ticket): handle order-by:
--order-by has been added to pubsub group.
New getPubsubExtra helper method generate extra dict according to arguments.
getPubsubExtra is used for pubsub/get, blog/get and and ticket/get.
2019-01-06 17:39:57 +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
677eebd553 plugin XEP-0380: register namespace 2019-01-06 17:34:56 +01:00
Goffi
9dd628d1ed plugin XEP-0060: fixed MAM return value on getItems():
callback to generate metadata was using wrong items in return argument.
2019-01-06 17:33:53 +01:00
Goffi
70253cd205 plugin XEP-0384: give feedback to user when trust must be handled before sending a message 2019-01-05 14:15:11 +01:00
Goffi
e3f279e718 plugin android: fixed path for .cagou_status 2019-01-04 19:12:43 +01:00
Goffi
e47a9b2027 plugin manhole: manhole debug plugin, first draft:
this plugin open a telnet server which open a Python interpreter and allows to inspect the backend while it is running.
To enable it, the settings "manhole_debug_dangerous_port_int" must be set to the desired TCP port in [DEFAULT] section of sat.conf.
A warning will be logged if the server is enabled.

Currently only a telnet server is available, and no login is required. This may change in the futur to enable login/password and ssh access, or even an XMPP access.
This is a debugging feature and must only be used during development.
Once in the Python interpreter, the "host" variable is accessible.
2019-01-04 18:59:24 +01:00
Goffi
7e5a2f59cf plugin XEP-0380, XEP-0384: use C.EXTRA_INFO_DECR_ERR as info sub-type when a message can't be decrypted. 2019-01-04 18:47:56 +01:00
Goffi
554248e108 plugin OTR: fixed a bug which was tagging every message as "encrypted" 2019-01-04 18:46:39 +01:00
Goffi
02dc38762e core (constants): added a constant for "encrypted" 2019-01-04 18:46:02 +01:00
Goffi
ed0312261e core (xmpp): don't add to history a message if there is no message and no subject. 2019-01-04 18:44:43 +01:00
Goffi
a93bf01800 plugin XEP-0380: Explicit Message Encryption implementation 2019-01-04 11:14:53 +01:00
Goffi
9ad238b884 core (memory/encryption): added getNamespaces method to retrieve all plugins namespaces 2019-01-04 11:14:17 +01:00
Goffi
1307adcd71 core (xmpp): added "extra" argument to client.feedback 2019-01-04 11:13:31 +01:00
Goffi
ccfdb695bc memory (sqlite): minor comment move 2019-01-04 09:26:57 +01:00
Goffi
610e88841a memory (sqlite): retry _runInteraction in the same way as for _runQuery, this improve reliability 2019-01-04 09:21:16 +01:00
Goffi
30081bba79 plugin XEP-0384: don't ignore StanzaError if it's not item-not-found 2019-01-04 09:20:32 +01:00