Commit graph

19 commits

Author SHA1 Message Date
a72152c462
plugins: Add refs to dependencies on plugins
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-04-12 16:43:53 +02:00
fcdef2d96c
plugins: Add dependencies support
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-04-11 18:14:01 +02:00
1184e9c600
BasePlugin: Remove debug logging
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-01 23:51:08 +01:00
7134716343
E2EE MUC support
This change transmits the original JID of the sender (in decrypt) or
receiver(s) (in encrypt).

Handling of MUC is not complete. It is possible that some participants
have access to realjids while others don't (e.g., moderators in
semi-anon MUCs).

The code currently doesn't handle this and this will cause at least two
issues:
- Sending an encrypted message in a semi-anon MUC would reveal the
  sender's identity (public key)
- Recipients wouldn't be able to decrypt this message as they don't have
  access to the sender's realjid. Unless they already have the bundle
  available and then they could associate the public key with a jid
  (another privacy issue/defeating the point of semi-anon rooms).

TODO: Fix this ^

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-01 22:36:41 +01:00
mathieui
5a1a2e6c18 Add a "passthrough" parameter for calls through the safetymetaclass
So errors don’t get caught
2019-12-27 18:57:33 +01:00
mathieui
6a7f5326da
Plugins: use import_module for module in poezio_plugins
And do not rely on the "module name" to index the plugins, use the
intended plugin name instead.
2019-12-27 16:58:20 +01:00
mathieui
5312382f8a
Adapt the plugin safety metaclass for async funcs 2019-08-22 16:22:57 +02:00
833cccb188 Rework priority handling for events
Introduce the concept of priority for event handlers, instead of the
position parameter.

The new `priority` parameter replacing `position` should be an integer
between 0 and 100. It defaults to 50.

The previous `position` parameter was only used to insert at a certain
position in the list of handlers (for this particular event). No
reference of it was kept, which means that it was not possible to ensure
an event was called in the position is was supposed to be.

I am now using per-event dicts, containing priority buckets (lists) of
handlers. I am using OrderedDicts to make it easier to loop through all
of the handlers, as insertion happens less often than reading.

I was also suggested using bisect with a simple list of tuples
(priority, handler) per event, but bisect tries to compare bound
methods, which is obviously not possible. Maybe it would be interesting
to find a way use this method instead of OrderedDict as that might be
less resource consuming.

This said, I don't think this part of poezio is a bottleneck at all, so
maybe this is just fine as is.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-06-22 03:01:02 +02:00
mathieui
6cc1360a3a
Remove the GPG plugin
It’s broken and nobody is using it as far as I know.
2018-08-09 00:29:13 +02:00
Emmanuel Gil Peyrot
f38bb06672 timed_events, plugin: Remove some DeprecationWarning on invalid escapes in docstrings. 2018-08-08 15:26:48 +02:00
mathieui
a28b9c4422
Update poezio for the new tabs module 2018-07-21 20:20:13 +02:00
Emmanuel Gil Peyrot
20ebea1c89 Stop making classes inherit from object. 2018-07-14 16:25:09 +02:00
Emmanuel Gil Peyrot
07e13a1220 Fix loading plugins. 2018-07-08 11:02:17 +02:00
Emmanuel Gil Peyrot
78d41b4989 plugin: Use the provided pathlib.Path. 2018-07-08 09:23:52 +02:00
mathieui
d55cc58725
yapf -ir 2017-11-12 15:03:09 +01:00
mathieui
fdb61cda27 Add missing message types (fix #3271)
Which were being filtered by the information popup filter
2016-12-26 16:01:35 +01:00
mathieui
8f7be37a70 Absolute imports everywhere 2016-06-30 23:36:25 +02:00
Emmanuel Gil Peyrot
6a1bd5f9b9 Make all relative imports explicit. 2016-06-27 23:54:50 +01:00
Emmanuel Gil Peyrot
332a5c2553 Move the src directory to poezio, for better cython compatibility. 2016-06-11 20:49:43 +01:00
Renamed from src/plugin.py (Browse further)