Commit graph

3,131 commits

Author SHA1 Message Date
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
af4320dfbe quick frontend (app): log own jid when received 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
610a8ff10b jp (profile): added --autoconnect argument in modify and create + use output in info 2020-01-25 21:08:39 +01:00
Goffi
da3b7b5fea jp (common): various Table fixes:
- renamed fromDict to more accurate fromListDict
- fixed handling of None filter in fromListDict
- fixes show_header when no header exist
- escape headers when using namedtuple, so it won't fail
2020-01-25 21:08:37 +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
d73fed6f24 doc (jp/message): typo 2020-01-25 21:08:29 +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
eca0f773cf quick frontend (widgets): don't use *args for onDelete + more debug logs 2020-01-17 20:27:35 +01:00
Goffi
d9e1ba8ce1 quick frontend (widgets): some more errors handling in getOrCreateWidget 2020-01-17 18:47:02 +01:00
Goffi
6bff1bdc33 quick frontend (widgets): fixed widget creation in getOrCreateWidget:
when a new widget was created, it was overwritting the exiting instances list. This patch
fixes it.
2020-01-17 17:55:57 +01:00
Goffi
6a18650a99 quick frontend (app): removed workaround for pyjamas 2020-01-17 15:27:39 +01:00
Goffi
f1372b6b94 quick frontend (widgets): added "widget_hash" helper property 2020-01-17 15:26:44 +01:00
Goffi
644e80df00 install (setup.py): use progressbar2 instead of progressbar 2020-01-11 17:20:44 +01:00
Goffi
f2fc3bc186 core (sat_main): avoid double init + log version 2020-01-10 10:22:46 +01:00
Goffi
64a4df4066 changelog: update 2020-01-10 10:10:42 +01:00
Goffi
ced601a824 quick_frontend (widget): typo 2020-01-03 20:10:58 +01:00
Goffi
160739e50f frontends (tools/strings): added "geo:" scheme in RE_URL 2020-01-03 17:10:53 +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
0cac2fbb40 bin: look for twistd3 first:
on some GNU/Linux discributions, `twistd` script is named `twistd3`, so sat script is now
looking for `twistd3` first.
If none is found, a message is printed on stderr and the script exit with an error code.
2019-12-27 13:30:20 +01:00
Goffi
bca7453ee1 plugin XEP-0384: typo 2019-12-20 14:26:05 +01:00
Goffi
1eee84c8f3 jp (blog): added --language to common publish argument 2019-12-20 14:23:42 +01:00
Goffi
e795f0958c CHANGELOG: update 2019-12-20 12:28:04 +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
2d49de9209 jp (file): new get command + encryption with upload:
- new file/get command let download a file from URL. It handles `aesgcm:` scheme by
thanks to backend decryption on the fly.
- new `--encrypt` option for upload. When used, the file will be encrypted using AES-GCM
  algorithm, and the `aesgcm:` URL will be returned
- for both commands, the XMLUI note is displayed in case of error
2019-12-20 12:28:04 +01:00
Goffi
5c1dd0da49 jp (xmlui_manager): use level for notes:
display notes in specific colors according to level, and use stderr for warnings and
errors.
2019-12-20 12:28:04 +01:00
Goffi
ef3bea43b8 doc (jp/shell): typos 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