Commit graph libervia-backend/sat
Author SHA1 Message Date
Goffi
ec5a51bebb core: log filenames of read config files 2020-01-29 19:42:02 +01:00
Goffi
3d86f0c983 core (constants): use parent of "sat" module dir as last config path 2020-01-29 19:28:08 +01:00
Goffi
6be3915b55 core (constants): missing trailing / 2020-01-29 19:21:16 +01:00
Goffi
21591bce92 core (constants): don't parse sat.conf from current dir anymore + parse root_dir last 2020-01-29 19:12:46 +01:00
Goffi
7f2c6cd8a6 core (constants): parse sat.conf from sat module dir 2020-01-29 19:05:41 +01:00
Goffi
4cb56362ec bridge (dbus): new bridge_dbus_int_prefix option (in [DEFAULT] settings) to change interface prefix 2020-01-29 18:54:40 +01:00
Goffi
c00fe7f1e6 plugin XEP-0384: fixed exception catching on getItems 2020-01-29 18:31:47 +01:00
Goffi
8937201eed plugin XEP-0280: handle CCed messages without "to" 2020-01-29 17:39:00 +01:00
Goffi
53cc1f1bac core: fixed findByFeatures:
jids where not correctly put in `found_own` and `found_roster` lists.
2020-01-29 12:38:48 +01:00
Goffi
b1edf2198c plugin XEP-0198: minor log formatting 2020-01-29 11:19:47 +01:00
Goffi
aadf9ed7e4 core (xmpp): raise InternalError when a new profile Client is created while there is already one in host 2020-01-29 11:00:14 +01: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
b0dd28a346 core (xmpp): don't purge entity on disconnect if continueTrying is set 2020-01-28 22:42:10 +01:00
Goffi
4eeb1ef3e8 plugin manhole: added d to namespace as shortcut for defer.ensureDeferred 2020-01-28 22:27:42 +01:00
Goffi
8252c15beb plugin XEP-0198: don't crash when xmlstream has been closed 2020-01-28 22:26:12 +01:00
Goffi
655361db1b plugin ip: fixed IP detection with external website 2020-01-27 19:53:31 +01:00
Goffi
5ffa208962 tools (common/files_utils): fixed get_unique_name when path is a str and not a Path 2020-01-27 19:53:31 +01:00
Goffi
b5303be035 plugin XEP-0184: show a warning and the message XML on missing id 2020-01-27 19:53:31 +01:00
Goffi
f496dfc640 core (memory): avoid session locking if profileAuthenticate is called twice quickly 2020-01-27 19:52:49 +01:00
Goffi
c82ca04673 android: deactivate annoying jnius logs when DEBUG is set 2020-01-27 19:52:46 +01:00
Goffi
764e247a0a plugin manhole: added "C" to namespace 2020-01-26 18:08:10 +01:00
Goffi
c951c67698 plugin android: reconnect profiles with autoconnect if network is activated:
if network is activated, we check that all profiles with autoconnect are indeed connected,
and reconnect them if necesssary.
2020-01-26 18:08:09 +01:00
Goffi
a485709173 plugin android: added a profileAutoconnectGet method:
this method will be called by frontend to know which profile to connect automatically
(when the frontend has been closed and is reopened, this will avoid to have to go through
the profileManager again).
2020-01-25 21:08:41 +01:00
Goffi
87659cf0f0 core (memory/params): added extra argument to filter out params notably in getParamsUI:
In some case, it may be desirable for a frontend to not expose some parameters to user
(e.g. it is the case on Android with the `autoconnect_backend` parameter). An new `extra`
parameter has been added to a couple of parameters method for that: it can contain the
`ignore` key with a list of [category, name] of parameters to skip.
2020-01-25 21:08:40 +01:00
Goffi
1d91db6f2c core: backend autoconnection:
A new Connection/autoconnect_backend param can be set for a profile or component to be
started automatically with backend. This is specially useful for components, but can be
useful for client profile too (e.g. on Android we need to start profile with backend to
get notifications, this part will come with following commits).

The new Sqlite.getIndParamValues method allows to retrieve the same parameters for all
profiles.
2020-01-25 21:08:32 +01:00
Goffi
9dc875550c quick frontend (app): call getReady once connected to bridge:
namespaces and encryption plugins are only retrieved once backend is ready, else they may
not yet be available (can happen notably when the backend is start at the same time as the
frontend, e.g. on Android).
2020-01-25 21:08:26 +01:00
Goffi
f85fb751fa core: added a debug log when a namespace is registered 2020-01-25 21:08:25 +01:00
Goffi
f2fc3bc186 core (sat_main): avoid double init + log version 2020-01-10 10:22:46 +01:00
Goffi
2555649dfb plugin android: sound notification + change settings:
- new notification sound
- vibration and notification sound are now activated depending on ringer mode (normal,
  vibrate or silent)
- notification sound/vibration can be configured in settings.
2020-01-03 13:21:27 +01:00
Goffi
bef19967d5 core (memory/params): new "makeOptions" method to easily create options XML from a dict 2020-01-03 13:20:45 +01:00
Goffi
b5af781b82 plugin XEP-0384: OMEMO for MUC implementation:
- encryption is now allowed for group chats
- when an encryption is requested for a MUC, real jids or all occupants are used to
  encrypt the message
- a cache for plain text message sent to MUC is used, because for security reason we can't
  encrypt message for our own device with OMEMO (that would prevent ratchet and break the
  prefect forward secrecy). Thus, message sent in MUC are cached for 5 min, and the
  decrypted version is used when found. We don't send immediately the plain text message
  to frontends and history because we want to keep the same MUC behaviour as for plain
  text, and receiving a message means that it was received and sent back by MUC service
- <origin-id> is used to identify messages sent by our device
- a feedback_jid is now use to use correct entity for feedback message in case of problem:
  with a room we have to send feedback message to the room and not the the emitter
- encryptMessage now only accepts list in the renamed "entity_bare_jids" argument
2019-12-30 20:59:46 +01:00
Goffi
a1ee6fedc1 plugin XEP-0359: handle origin-id 2019-12-30 20:44:05 +01:00
Goffi
7dd0df7f41 core, bridge: encryptionPluginsGet now returns a serialised list + added "directed" in metadata 2019-12-30 20:44:04 +01:00
Goffi
efe52d755d plugin XEP-0045: added room statuses to metadata:
room statuses are now sent with other metadata on bridge signals, and saved in Room
instance. They give useful data on the room, for instance they can be used to know if a
full jid is used in this room.
2019-12-30 20:44:02 +01:00
Goffi
b7a74d5034 plugin XEP-0060, jp (pubsub/set): publish-options implementation:
- publishing options (XEP-0060 §7.1.5) implementation.
- jp pubsub/set can specify publish-options using `-f` and `-F`
- doc has been updated to explain that
- psItemSend and psItemsSend now use serialisation for "extra"
- publish-options can be specified in extra['publish-options'] with those methods
2019-12-28 20:02:18 +01:00
Goffi
bca7453ee1 plugin XEP-0384: typo 2019-12-20 14:26:05 +01:00
Goffi
3e07cd6c01 plugin android: removed comment on vibrator bug as it is fixed in dev version of plyer 2019-12-20 12:28:04 +01:00
Goffi
174f7bec4c tools (common/files_utils): get_unique_name now uses and returns Path instances. 2019-12-20 12:28:04 +01:00
Goffi
f9a034509c plugin sec aesgcm: new plugin handling aesgcm: scheme for e2e encrypted media sharing:
The scheme is register with download meta plugin, and it is activated with HTTP Upload
(XEP-0363) when `encryption` is used in `options` with the value of C.ENC_AES_GCM.
This is also known as `OMEMO Media Sharing` even if this method is not directly linked to
OMEMO and can be used independently.
2019-12-20 12:28:04 +01:00
Goffi
edbee4d719 plugin upload, XEP-0363: code modernisation + preparation for extension:
- use of async/await syntax
- fileUpload's options are now serialised, allowing non string values
- (XEP-0363) Slot is now a dataclass, so it can be modified by other plugins
- (XEP-0363) Moved SSL related code to the new tools.web module
- (XEP-0363) added `XEP-0363_upload_size` and `XEP-0363_upload` trigger points
- a Deferred is not used anymore for `progress_id`, the value is directly returned
2019-12-20 12:28:04 +01:00
Goffi
dfed376f62 plugin file download: meta plugin to handle file download:
- first code in backend to use async/await Python syntax \o/
- plugin with file upload
- URL schemes can be registered
- `http` and `https` schemes are handled by default
2019-12-20 12:28:04 +01:00
Goffi
689e43f6d2 tools (stream): data modification on SatFile:
- if `data_cb` is used and if it returns a not None value, it is used instead of the data
  read from the file. This allows data modification on the fly, useful notably for
  encryption
- new `check_size_with_read` argument which check size on `close()` using amount of data
  actually read/written instead of file size. This avoid a warning when file is modified
  on the fly
- added `closed` attribute
2019-12-20 12:28:04 +01:00
Goffi
26c01ca4dc plugin XEP-0045: show join error even if it's not a StanzaError, log it with warning instead of error 2019-12-20 12:28:04 +01:00
Goffi
a300181a01 plugin XEP-0384: update to latest python-omemo + better trust management:
- python-omemo minimal version is now 0.11.0
- `undecided` devices are now handled, fixing the "accept all or none" issue: if a device
  is `undecided`, the trust manager will be shown with the missing devices before sending
  the message.
- `untrusted` devices are discarded
2019-12-20 12:28:01 +01:00
Goffi
ad1ec9698c plugin XEP-0384: specific warning on missing omemo-backend-signal + fixed encoding following Python 3 port 2019-12-07 11:30:56 +01:00
Goffi
3d7cda8eb5 plugin events: fixed eventInviteeGet signature 2019-12-06 15:20:00 +01:00
Goffi
c01889f16c plugin manhole: fixed default value 2019-12-06 15:19:31 +01:00
Goffi
808790933a plugins (imap, maildir, smtp): removed plugins IMAP, Maildir and SMTP:
they were experimental plugins, are not used and Maildir has not been ported to Python 3
2019-12-06 15:02:02 +01:00
Goffi
dc930b1890 plugin XEP-0045: don't fail on item-not-found with MAM:
Some servers don't store permanently the whole history of MUC with MAM. As a result, an
"item-not-found" stanza error can be received when message id used as reference doesn't exist
anymore on the server.
When this case happens, the history is retrieved in the same way as for a newly joined room
(i.e. last 50 messages are requested).
2019-12-05 23:05:16 +01:00