Commit graph

2,665 commits

Author SHA1 Message Date
Goffi
6fe84eb8bf core: minor version fix for pyjamas workaround 2018-08-31 15:25:25 +02:00
Goffi
1cb7461f99 quick frontend (app, chat): encryption handling:
- new QuickApp.ENCRYPTION_HANDLERS class attribute, if True (default), encryption handlers are set
- encryption plugins are retrieved on startup and cached in QuickApp.encryption_plugins list
- QuickChat's encrypted boolean attribute indicate if a session is currently encrypted. This is updated
  automatically if ENCRYPTION_HANDLERS is set
- if ENCRYPTION_HANDLERS is set, messageEncryptionStarted and messageEncryptionStopped are called when
  suitable.
2018-08-11 18:24:55 +02:00
Goffi
3fc6de121a jp (message): new encryption/algorithms command to retrieve available encryptions algorithms. 2018-08-11 18:24:55 +02:00
Goffi
d206324fbe plugin XEP-0384: PEP handling + mark as encrypted:
devices are gotten using PEP and +notify, and bundles are then retrieved, and kept in cache.
This allow to remove the test code which was always requesting devices and bundles before
sending a message. For now OMEMO plugin will only work with people in roster, this will be
fixed in the future.
2018-08-11 18:24:55 +02:00
Goffi
f1cbf0659e core (xmpp): send initial presence only after all profileConnected have been treated:
presence is now sent after profileConnected methods are done, this avoid to have to deal with synchronisation in connection event.
For instance, PEP events should not be sent before presence is sent, so profileConnected methods can assume PEP events are not
done yet, and do needed initialisation using async method if necessary.

This has been done to avoid overcomplicated synchronisation in XEP-0384 plugin (network calls are needed to initialise session,
but PEP events need an initialised session to be treated).
2018-08-11 18:24:55 +02:00
Goffi
aa262570a6 plugin XEP-0163: fixed bad PEP filtering 2018-08-11 18:24:55 +02:00
Goffi
e18036d2fb plugin OTR: use new "directed" attribute when registering + use new markAsEncrypted 2018-08-11 18:24:55 +02:00
Goffi
e4bda681b8 core (memore/encryption): new methods and checks:
Following methods are now available though bridge:
    - messageEncryptionStop
    - messageEncryptionGet: retrieve encryption data for a message session
    - encryptionPluginsGet: retrieve all registered encryption plugin

Following methods are available for internal use:
    - getPlugins: retrieve registerd plugins
    - getNSFromName: retrieve namespace from plugin name
    - getBridgeData: serialise session data (to be used with bridge)
    - markAsEncrypted: mark message data as encrypted (to be set by encryption plugin in MessageReceived trigger)

Behaviours improvments:
    - start and stop send messageEncryptionStarted and messageEncryptionStopped signals, and a message feedback
    - new "replace" arguments in start allows to replace a plugin if one is already running (instead of raising a ConflictError)
    - plugins declare themselves as "directed" (i.e. working with only one device at a time) or not.
      This is checked while dealing with jids, an exception is raised when a full jid is received for a non directed encryption.
    - use of new data_format (de)serialise
2018-08-11 18:24:55 +02:00
Goffi
7eab898ef3 plugin otr: use namespace specified in XEP-0378 2018-08-11 18:24:55 +02:00
Goffi
9291d24a99 tools (common/data_format): added serialise and deserialise methods (using json for now) 2018-08-11 18:24:55 +02:00
Goffi
64d502958f core (bridge): new messageEncryptionStarted and messageEncryptionStopped signals (not used yet) 2018-08-11 18:24:55 +02:00
Goffi
583d4b0c2e plugin XEP-0384, install: adapted plugin to omemo module changes + added omemo module to dependencies:
- omemo module logs are now integrated in SàT
- OmemoStorage adapated to changes
- now really delete OTPK each time, behaviour may be modified in future
- fixed bad arguments used during decryption
- adapted to other changes

OMEMO is now working \o/
It still needs some adjustements though: bundles/devices are for the moment requested on each message encryption, and fingerprints management is not implemented yet.
2018-08-11 18:24:55 +02:00
Goffi
cadc29f8c2 plugin OTR: integrated in new encryption handler + fixed use of bare jid where full jid was expected 2018-08-11 18:24:55 +02:00
Goffi
11058bec8a plugin XEP-0334: added a method to add hint directly to elements (i.e. on domish.Element instead of message data) 2018-08-11 18:24:55 +02:00
Goffi
48427e3bdd core (memory/encryption): start improvments, stop and getSession:
- "start" won't do anything if session is already encrypted with requested algorithm, and will raise a ConflictError if it's already encrypted but with an other algorithm
- implemented "stop", with an optional namespace to check we are stopping the expected algorithm
- "getSession" retrieve the current encryption session of a jid, if any
2018-08-11 18:24:55 +02:00
Goffi
c5c46f3558 tools (trigger, async_trigger): added no_cancel argument to point and asyncPoint when a trigger must not be cancellable 2018-08-11 18:24:52 +02:00
Goffi
027909103e core: we are in dev version again 2018-08-04 13:03:44 +02:00
Goffi
14412f7a27 plugin XEP-0384: OMEMO implementation first draft:
this is the initial implementation of OMEMO encryption using python omemo module.
/!\ This implementation is not yet working /!\
2018-07-29 19:24:21 +02:00
Goffi
34f3a2e949 plugin XEP-0060: added singleton ID ("current") 2018-07-29 19:23:01 +02:00
Goffi
32b4db60c9 core: new EncryptionHandler class which manage encrypted session as a core feature:
Plugin handling encryption can now register using host.registerEncryptionPlugin, and an encryption session can now be started using messageEncryptionStart bridge method.

This will make encryption handling more easy, as we now know if a session is clear or e2e encrypted, and which plugin handle it.
2018-07-29 19:22:56 +02:00
Goffi
68014352a0 core: added async TriggerManager
Async trigger manager add an asyncPoint method which can be used with Deferred (or sync method).
This allow a triggers do to some long operations like doing network requests.

MessageReceived and sendMessageData now use asyncPoint.
2018-07-29 19:22:51 +02:00
Goffi
34a6d18475 core (memory/persistent): better default value handling in LazyPersistentBinaryDict (don't jump to debugger in debug mode if value is not found) 2018-07-29 18:44:49 +02:00
Goffi
ff79fa3ce0 core: style improvments (90 chars limit) 2018-07-29 18:44:27 +02:00
Goffi
0e23f244f5 Added tag 0.7.0a2 for changeset b42aa52d2621 2018-07-08 18:38:32 +02:00
Goffi
86c0767a96 0.7.0a2 release 2018-07-08 18:38:29 +02:00
Goffi
a3ed513ee1 install (setup.py): don't use sys.prefix for locales 2018-07-08 18:37:36 +02:00
Goffi
9e03d02f18 jp (blog): fixed path encoding for inotify 2018-07-08 11:15:22 +02:00
Goffi
133e184c5e Added tag 0.7.0a1 for changeset 534b264d63df (replace former tag after setup fix) 2018-07-04 08:00:19 +02:00
Goffi
a84634d3f8 install: fixed DBUS_FILE path 2018-07-04 07:58:24 +02:00
Goffi
44ca9f82c9 Added tag 0.7.0a1 for changeset eecd84a2530a 2018-07-04 07:33:26 +02:00
Goffi
ec28adf7b6 0.7.0a1 release 2018-07-04 07:26:20 +02:00
Goffi
653b1f1155 plugin XEP-0077: fixed RegisteringAuthenticator to use TLS if possible 2018-07-04 07:26:20 +02:00
Goffi
eb0bc41c65 misc: renamed former tags from "SàT va.b.c" to "a.b.c" 2018-07-04 07:24:42 +02:00
Goffi
c1defc005d quick_frontend (chat): create target in cache if it is not found, avoiding an exception 2018-07-02 08:54:57 +02:00
Goffi
8c1b3ed451 doc (CHANGELOG): added D-Bus namespace change 2018-07-02 08:53:29 +02:00
Goffi
e19377f6eb doc (CHANGELOG): prepared CHANGELOG for 0.7 release + unified indentation to 4 spaces 2018-07-02 08:26:02 +02:00
Goffi
8400e0a1a8 doc (README): removed version from README to avoid having to update it each time + removed mentions to future frontends 2018-07-02 08:25:04 +02:00
Goffi
f2b1398a9f core, frontends: replaced org\.goffi namespaces by org.salutatoi + fixed generation:
generation of D-Bus bridge has been broken by black formatting tool, this patch fixes this.
2018-07-01 20:37:58 +02:00
Goffi
b9a6cdd785 plugin merge-request/mercurial: fixed missing last line in diff while parsing patch 2018-06-29 15:54:46 +02:00
Goffi
1a74cdce28 quick_frontend (QuickApp): fixed getCache handling after changes in QuickContactList 2018-06-27 22:50:32 +02:00
Goffi
d5c9fa5e31 plugin XEP-0070: use a confirm dialog instead of a form + simplified a bit the code 2018-06-27 21:15:34 +02:00
Goffi
744cb0c503 code style reformatting using black 2018-06-27 20:14:46 +02:00
Goffi
4127bcffd0 plugin merge request (mercurial): clean item_id for import (some chars are not accepted in name) 2018-06-27 07:51:29 +02:00
Goffi
da71887397 core: lines limit 2018-06-27 07:50:35 +02:00
Goffi
e9ca46fba3 plugin merge request (mercurial): escape colons in import name 2018-06-27 07:23:59 +02:00
Goffi
ea9583aea0 core: some more line limiting 2018-06-27 07:23:13 +02:00
Goffi
8432630146 doc (INSTALL): replaced instruction with a simple link to the wiki, to avoid duplication and desynchronisation 2018-06-26 22:02:59 +02:00
Goffi
cf0d3af803 quick app: added missing docstring in showDialog 2018-06-26 07:09:49 +02:00
Goffi
519451bd84 quick_frontend(contact list): refactored update:
update is now called with appropriate constant value (C.UPDATE_ADD, C.UPDATE_DELETE, C.UPDATE_MODIFY and so on) when a widget change visibility according to current options.
Before it was linked to cache only (C.UPDATE_ADD was only called when contact was first added to cache).
This make widget handling in frontends more easy.

Renamed entityToShow to entityVisible, which seems to correspond better.

Started reducing lines lenght to 90 chars as a test. May become the new coding style soon.
2018-06-24 21:59:29 +02:00
Goffi
a365c2b797 plugin events: invitations improvments + personal list
- added invitation by <message> mechanism
- added a personal list in PEP which keep events created by user, or in which she has been invited
- new bridge methods: eventsList, and eventInviteByEmail. eventInvite is now used to invite a entity by jid (not email like before)
- on invite, an invitation message is send to invitee's jid
- when an invitation message is received, event is automatically linked in personal list
- when creating a new event, event is automatically linked in personal list
2018-06-21 01:21:44 +02:00