Commit graph

3,630 commits

Author SHA1 Message Date
Goffi
2cc637cdfe cli (base): use XTERM_VERSION to detect XTerm:
Using `TERM` is not good as it is used by other terminal emulators which are incompatible
with ANSI sequences (seen with `cool-retro-term`).
2021-11-06 18:53:00 +01:00
Goffi
1419f29df6 cli (debug/theme): display currently used background 2021-11-06 17:09:28 +01:00
Goffi
b1529c1ebf cli (base): better background detection:
- ANSI escape code detection is only used on terminals known to be compatible (currently
  xterm, konsole, and all VTE based ones)
- `COLORFGBG` environment variable is used as fallback
- if both methods fail, `dark` is used

This should avoid problems with incompatible terminals (e.g. on QTerminal, users had to
press `[ENTER]` each time).

fix 406
2021-11-06 17:08:50 +01:00
Goffi
b374f17eb6 tests (e2e/web): add basic tests for generic lists 2021-11-05 18:11:24 +01:00
Goffi
b7c1579919 tests (e2e/run_e2e): fix inappropriate use of -T option 2021-11-05 18:11:24 +01:00
Goffi
38ec47a4da plugin comp file sharing: don't use Deferred in return value 2021-11-05 18:11:24 +01:00
Goffi
ecc6f96990 plugin email invitations: re-use existing invitation for a given email:
if an invitation is done on an email which has already received an invitation, it is
re-used and no new XMPP account or Libervia profile is created (the name is modified
though).

This is currently done in an inefficient way due to `LazyPersistentBinaryDict` limitations
(all invitations are loaded and checked to find the email). A more efficient check should
be easier to implement with storage changes in 0.9 .
2021-11-05 18:11:18 +01:00
Goffi
d39a80ee5f plugin XEP-0264: replace SIZE_FULL_SCREEN by SIZE_BIG:
`SIZE_FULL_SCREEN` may result in large files, and BoB is currently used to transfer them,
resulting in potentially large stanza. As a result, Libervia profile can be disconnected
from server if stanza max size is reached.

As a temporary workaround, `SIZE_BIG` is now the maximum size used. This should be fixed
in 0.9 with a proper way to transfer large thumbnails (i.e. not BoB).
2021-11-05 18:08:39 +01:00
Goffi
7c37f32dc4 core: don't callback self.conn_deferred if already called:
if the connection has been lost (e.g. forced disconnection by server),
`self.conn_deferred` may have already been called, thus this is now checked to avoid an
exception.
2021-11-04 18:27:36 +01:00
Goffi
3838f04169 install: requirements update 2021-11-04 18:13:55 +01:00
Goffi
bdbf4596da plugin XEP-0384: fix encryption for user own devices:
our own jid is added automatically by OMEMO library, but during the generation of the
stanza, our list of jids was used to get the keys (and thus our own jid and devices keys
was missing).

fix 402
2021-10-22 18:46:51 +02:00
Goffi
22db0b9880 docker (prosody): don't use tmpfs for /var/lib/prosody (it prevents the container to start) 2021-10-22 10:40:24 +02:00
Goffi
770d4e8f35 docker (prosody): remove unused entrypoint.sh file and sed from Dockerfile:
The `sed` is not necessary anymore in recent Docker images, since
https://github.com/prosody/prosody-docker/pull/65 has been merged.
2021-10-22 10:39:05 +02:00
Goffi
28b0a91fc7 plugin text syntaxes: remove id attributes and whitelist allowed classes:
for now, the only allowed classes are the one used for code highlighting.

fix 389
2021-10-21 11:55:39 +02:00
Goffi
e529391500 docker (web-demo): fix prosody tmpfs instruction 2021-10-21 11:53:56 +02:00
Goffi
6f0ecc0105 docker (docker-compose-e2e): fix tmpfs instruction for prosody 2021-10-20 17:24:09 +02:00
Goffi
0ba1709bb5 docker: use @ instead of tip for dev images:
`tip` links to most recent commit which may be on an other bookmark than the main one.
By using `@`, we're sure that the main bookmark is used.
2021-10-20 17:23:22 +02:00
Goffi
60f3f89883 docker: fix use of REVISION in FROM instruction 2021-10-20 17:21:54 +02:00
Goffi
7c31c279e4 docker: fix use of File Sharing component following entry point renaming 2021-10-20 17:19:57 +02:00
Goffi
5903aaf29b misc (.hgignore): exlude e2e tests reports 2021-09-30 10:33:09 +02:00
Goffi
24ce06eedf install (setup): set minimum version of python-dateutil to 2.8.1:
`dateutil.parser.ParserError` is only available from `2.8.1`, thus this become the minimum
required version.
2021-09-30 10:32:04 +02:00
Goffi
f52cc88ae2 plugin XEP-0054: fix wrongly used await:
`_checkAvatarHash` was incorrectly awaited. This method is only called once, the code has
been moved directly to `update`.
2021-09-30 10:30:43 +02:00
Goffi
8c9af32d56 doc: components documentation:
rel 362
2021-09-26 16:38:00 +02:00
Goffi
31985ed0fc component (file-sharing): use file-sharing instead of file_sharing:
a dash is used instead of underscore for entry-point and config section., as it is best
practice to use dash on command-line.
2021-09-26 16:35:56 +02:00
Goffi
3433657ccf jp (common): add neovim (nvim) default arguments 2021-09-26 16:35:49 +02:00
Goffi
9753dd5354 tests (e2e): print revision used in run_e2e 2021-09-08 17:57:28 +02:00
Goffi
cb62511fa7 tools (common/async_process): remove useless encoding + use full path for command:
- arguments don't need to be encoded anymore, `spawnProcess` handles str directly now
- use full path even for first argument: even if first argument should be only executable
  name, it appears that using full path only in `command` is not enough (seen with Python
  where system installation is used instead of the VirtualEnv one when full path is not
  used as first argument).
(grafted from 25cbaf04772855cd8aead18771465a4f00f5fa03)
2021-07-29 22:51:01 +02:00
Goffi
9293c7259d tests (e2e/cli): update JSON and XML outputs following changes in Libervia CLI 2021-09-08 11:18:01 +02:00
Goffi
29e76c1adb test (e2e/cli): use max_items instead of max when retrieving blog items:
RSM `max` alone will return first (oldest) items, while `max_items` will return latest
ones. As Libervia Pubsub as been fixed in this regard, tests are now fixed too.
2021-09-08 11:17:51 +02:00
Goffi
6b2e0649a3 tests (e2e/web): fix test files paths following global name change 2021-09-08 11:17:43 +02:00
Goffi
debbdba8eb tests (e2e): fix names in run_e2e script, following global name change. 2021-09-08 11:17:34 +02:00
Goffi
fb310c104c plugin misc file: fix getDestDir returning a Deferred in a coroutine 2021-09-08 11:17:19 +02:00
Goffi
47d258e841 plugin android: use callFromThread instead of callLater:
`callLater` is not made to be called outside of main thread, `callFromThread` is the
method to call in this case.
2021-09-08 11:17:13 +02:00
Goffi
5cf43b2e2e core (memory/persistent): implement __repr__ (via __str__) 2021-09-08 11:17:04 +02:00
Goffi
0c3910bafd plugin XEP-0353: fix jingle initiation on disco "Service Unavailable" error:
When requesting disco info on a bare jid which is not in our roster, server may return
"Service Unavailable" (to avoid leaking valid JIDs). In this case, the initiation was
failing, this is now fixed by using empty categories in this case.
2021-09-08 11:16:52 +02:00
Goffi
6bf40afe6a plugin XEP-0353: fix plugin modes 2021-09-08 11:16:48 +02:00
Goffi
12209c1bdc core (main): check plugin modes and skip pluggin/log an error if value is invalid 2021-09-08 11:16:35 +02:00
Goffi
f2988ea7be core (sat_main): fix the "Could not initialize backend" error logging 2021-09-08 11:16:29 +02:00
Goffi
f29a6bfa17 bridge (dbus/frontend): reintrospect signature in case of guess error:
When a "Unable to guess signature […]" `ValueError` is raised during a method call, the
signatures are re-introspected. This should fix this issue when a frontend is launched
just after to the backend (this happens notably with tests).
2021-09-08 11:16:21 +02:00
Goffi
22bc31ca4b docker: set DBUS_SESSION_BUS_ADDRESS so that it uses remote TCP with local fallback:
When connecting to Docker service, first the `backend` container will be tried with TCP,
then an Unix Socket will be used as fallback.
The Unix Socket is put in Libervia local dir which is a volume shared between containers.
This way D-Bus can be used with a remote backend, or the backend can be run locally
(notably during build when accounts creation or other settings must be done via Libervia
CLI).
2021-09-08 11:16:00 +02:00
Goffi
317cbb59e8 docker: fixes following global renaming 2021-09-08 11:15:54 +02:00
Goffi
88afb112d8 doc (contributing): typo 2021-09-08 11:15:41 +02:00
Goffi
33c2fb105b doc (contributing): fix docker-compose-e2e.yml spelling 2021-09-08 11:15:24 +02:00
Goffi
dae3308751 plugin XEP-0277: use common.uri to parse comment URIs 2021-09-08 11:14:53 +02:00
Goffi
adad4494c3 tools (common/uri): fix uri parsing for Python 3.9+ 2021-09-08 11:14:47 +02:00
Goffi
a446d91c93 docker: Libervia revision can now be specified:
Using the `DOCKER_LIBERVIA_REV` environment variable, backend (and related repos) revision
can now be specified. By default (variable empty or not set), the current `tip` version is
used, and `dev` is used for tagging. If the variable is set, the revision will be used and
used for tagging the image.
2021-09-08 11:14:17 +02:00
Goffi
2152d57887 CLI: use global constants for output names 2021-09-08 11:13:35 +02:00
Goffi
25a31896cb cli: call bridge.getReady() after bridge connection 2021-09-01 13:46:43 +02:00
Goffi
547eb9feba bridge: bridge can now be set using environment variable:
The `LIBERVIA_BRIDGE_NAME` environment variable can now be used to specify the bridge to
use. If set and different from empty string, the environment has precedence over config
file value.

For `pb` bridge, the following environment variable can also be used:

- LIBERVIA_BRIDGE_PB_CONNECTION_TYPE
- LIBERVIA_BRIDGE_PB_HOST
- LIBERVIA_BRIDGE_PB_PORT
2021-08-28 15:26:02 +02:00
Goffi
404a2820cf doc: minor typo 2021-08-27 14:59:47 +02:00