Commit graph

2,816 commits

Author SHA1 Message Date
Goffi
fc007dae38 plugin XEP-0280: priority and "sent" fixes:
- carbon prioriy must be bigger than ones of encryption plugins, because the carbon copied messages must be unwrapped to be decrypted, this patch fixes it
- "sent" carbon elements was only stored and notified to frontends, it is now unwrapped and injected in normal traffic, this way other plugin can manage it, in particular encrypted elements can be decrypted
2019-02-28 18:57:06 +01:00
Goffi
409118f255 plugin XEP-0045: fixed issue with deepcopy by using new xml_tools.elementCopy method 2019-02-28 18:57:04 +01:00
Goffi
82bb99f88c core (xml_tools): new elementCopy method to shallow copy a domish.Element 2019-02-28 18:57:00 +01:00
Goffi
208dc38433 core: we are in dev version again 2019-02-28 18:56:48 +01:00
Goffi
a56c9dd845 plugin OTR: do profile session init in profileConnecting, so it is done before receiving any stanza 2019-02-25 08:07:00 +01:00
Goffi
f40b43dca5 plugin OTR: disabled menu as the new generic encryption menu allows to start/stop OTR or display the trust UI. 2019-02-24 14:12:06 +01:00
Goffi
d8f6620d00 core: added a base menu allowing to set encryption session or show the trust management UI. 2019-02-24 14:11:08 +01:00
Goffi
2e4f4069c5 core (patches): partially fixed jid caching:
jid caching in Twisted use a dict (__internJIDs) which associate a jid as string to its jid.JID instance.
But this caching doesn't handle mutability of the objects, resulting wrong jid returned when a modification is done (e.g. if resource is changed).
This is a temporary workaround until the patch is proposed and merged upstream.

note: this is a partial fix because the caching is also leaking memory (cf. https://twistedmatrix.com/trac/ticket/5122)
2019-02-24 14:09:44 +01:00
Goffi
39025b9f15 jp (blog/edit): changed comments handling:
"-C" now allow comment and "--no-comments" explicitly disable it. This way when none of this option is used, the current state of the item is kept without deleting accidentaly the comments node.
2019-02-23 19:00:25 +01:00
Goffi
512ae0b91e plugin XEP-0277: blog items data are now entirely serialised before going to bridge:
So far, and for historical reasons, blog items data where serialised using a unicode: unicode dict, which was causing trouble for many types of values (timestamps, booleans, lists).
This patch changes it by serialising the whole items before going to bridge, and deserialising it when going back. This way, complex data can be used easily in items.
This impact psEvent and serItemsData* methods which are renamed transItemsData* because there are not always serialising anymore (a new argument "serialise" allows to specify it).
When editing a blog post in jp, metadata are now more easy to manipulate, specially lists like tags.
2019-02-23 18:59:00 +01:00
Goffi
c89a771c06 misc (README): typo 2019-02-20 19:42:35 +01:00
Goffi
d8ab8b76f8 jp(pubsub): minor code style fixes 2019-02-15 22:24:57 +01:00
Goffi
bb5a2befc5 jp (pubsub/node): new "import" command, to publish many nodes from an XML file 2019-02-15 22:13:43 +01:00
Goffi
d747c46736 jp (pubsub/transform): use new psItemsSend method, it is not needed anymore to send items one by one when --admin is not used 2019-02-15 22:13:43 +01:00
Goffi
83f97b600c jp (pubsub/node): added purge command 2019-02-15 22:13:43 +01:00
Goffi
fc3598e660 plugin XEP-0060: added purgeNode/psNodePurge method to remove all items from a node 2019-02-15 22:13:43 +01:00
Goffi
d1e3821e5a plugin XEP-0060: added sendItems/psItemsSend method to publish several items at once 2019-02-15 22:13:20 +01:00
Goffi
0bef95130f Added tag 0.7.0a3 for changeset 7d2d28564b3e 2019-02-06 09:10:31 +01:00
Goffi
bdbee15da9 0.7.0a3 release 2019-02-06 09:10:27 +01:00
Goffi
5827849863 tools (common): fixed dateutil.parser import 2019-02-02 01:12:54 +01:00
Goffi
f537241232 plugin XEP-0198: don't use hooks on components 2019-02-02 01:05:25 +01:00
Goffi
2a5ea36101 plugin XEP-0198: fixed typo resulting in a crash on resume 2019-01-26 20:08:33 +01:00
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