Commit graph

4,200 commits

Author SHA1 Message Date
Goffi
133fe9c6fe plugin XEP-0444: fix emoji check and ID used 2023-12-13 22:00:25 +01:00
Goffi
b571b0d6e2 plugin XEP-0424: fix ID used and recipients 2023-12-13 22:00:25 +01:00
Goffi
817d7b6daf plugin XEP-0308: fix ID used, recipients and author check. 2023-12-13 22:00:25 +01:00
Goffi
5470bbf7b9 plugin XEP-0359: if no origin ID is found, use <message> ID instead:
This way, we always have the right ID to check for non groupchat message in
`History.origin_id`.
2023-12-13 22:00:25 +01:00
Goffi
79fd3d7c13 plugin XEP-0045: avoir crash if subject is not set when _get_room_joined_args is called. 2023-12-13 22:00:25 +01:00
Goffi
b12d7a48e1 docker (demo): fix starting + better UX:
- Use the new `wait_for_service` option to be sure that Prosody is launched.
- Use the new `init_script_path` option to initiate forums and bookmark a demo room.
- Activate MUC service.
- Change log formats to make them more readable.
2023-12-13 22:00:25 +01:00
Goffi
6fa46e20fd core (launcher): new wait_for_service option:
if `wait_for_service` is used in `[DEFAULT]`, the service at the specified host/port is
waited for before starting the backend. This is useful in the situation where we need to
be sure that something is started before running, e.g. in a container.
2023-12-13 22:00:25 +01:00
Goffi
e14dd9da8b core: add new init_script_path option:
`init_script_path` option can be used in `[DEFAULTS]` to run a script at the end of
backend initialisation. A new `init_pre_script` method is used to wait for backend to
reach this stage (designed to be used mostly by CLI frontend), then the usual `ready_get`
method is finished once the script is finished.
2023-12-13 22:00:22 +01:00
Goffi
258c99b3c5 plugin forums: parsing fix + formatting:
- reformatted with black
- fix parsing of forums
- minor improvements
2023-12-12 12:17:15 +01:00
Goffi
b634e41ac0 core, doc, cli (forums): new forums set commands + doc:
- document the fact that if an empty `uri` is used, the forum node is created
  automatically
- new `forums/set` CLI commands and its documentation
2023-12-11 18:10:27 +01:00
Goffi
05bdfe122a component AP gateway: be sure to have a string for error message. 2023-12-11 18:07:58 +01:00
Goffi
690c79b956 docker (backend-dev-demo): command renaming + add a bookmark to avoid empty chat 2023-12-11 00:54:01 +01:00
Goffi
c31b33c01d docker (backend-dev): update Debian version + getting OMEMO related packages from git is not necessary anymore 2023-12-11 00:53:59 +01:00
Goffi
c2057264ce docker: update certificates 2023-12-11 00:53:57 +01:00
Goffi
1dd8a46572 plugin XEP-0277: fix comments node handling when parent node doesn't exist. 2023-12-11 00:46:34 +01:00
Goffi
ff5c2e0ea5 plugin ad-hoc registration: Implement plugin to handle registration links:
registration links are used in web frontend to allow registration with secret links when
it's normally closed.
2023-12-10 18:32:04 +01:00
Goffi
f1cc34cc53 plugin XEP-0050: small code quality improvements + add C.ENTITY_ADMINS magic key to allow administrators profiles 2023-12-10 15:08:08 +01:00
Goffi
b8d00757d3 plugin XEP-053, component AP gateway: use the new trigger.add_with_check method 2023-12-09 19:20:13 +01:00
Goffi
ba1475962e core (tools/trigger): new add_with_check method:
this method add a wrapper which will skip the trigger is the plugin is not available in
the session (e.g. a component which doesn't use the plugin).
2023-12-09 19:19:26 +01:00
Goffi
2db4ba9b3e plugin XEP-0471: modify variable name to be linter friendly. 2023-12-09 19:17:34 +01:00
Goffi
bbac8b6822 plugin IP: fix use of legacy URL + coroutine use:
An https:/salut-a-toi.org URL was used to retrieve external IP, but it's not valid
anymore, resulting in an exception. This feature is currently disabled.

Also moved several methods from legacy inline callbacks to coroutines.
2023-12-09 14:30:54 +01:00
Goffi
34fa69661c core: fix path in get_local_path:
`local_dir` was not used in final path, resulting in workind dir used instead or actual
local path.
2023-12-09 14:05:02 +01:00
Goffi
d80c4e89dc plugin XEP-0277, doc: conflict is now checked and avoided if user_friendly_id_suffix is False, doc updated 2023-12-05 13:39:03 +01:00
Goffi
3c6cd70c80 doc (cli/blog): Document new --alt-link option 2023-12-05 13:14:55 +01:00
Goffi
836c8bc896 cli (blog): new --alt-link option to specify alternate links 2023-12-05 13:14:33 +01:00
Goffi
4db2a87feb plugin XEP-0277: generate and parse altertate links with the new alt_links data in extra 2023-12-05 13:14:03 +01:00
Goffi
e3370c0a00 doc (cli/blog): documentation of the new --no-id-suffix option. 2023-12-05 13:13:03 +01:00
Goffi
2aecd646f0 cli (blog): add --no-id-suffix flag, to prevent adding random suffix to user-friendly IDs 2023-12-05 13:12:01 +01:00
Goffi
f35d799e28 Plugin XEP-0277: Add metadata to prevent adding random suffixes to generated user-friendly IDs. 2023-12-05 13:10:21 +01:00
Goffi
6f8230804f core (constants): user platform temporary dir by default for PID files 2023-12-04 17:51:28 +01:00
Goffi
516fa2e673 quick_frontend, tui: fix name conflict with show_resources 2023-12-01 18:23:04 +01:00
Goffi
510b6fb62c component AP gateway: log a warning instead of raising an exception in onMessage:
if something goes wrong, a warning is logged instead of raising a failing in `onMessage`'s
`get_ap_actor_id_from_account` and `sign_and_post` calls.
2023-12-01 18:22:26 +01:00
Goffi
0979b3fee3 core (message): fix calling of post treatments during message workflow 2023-12-01 18:20:27 +01:00
Goffi
ec2a637847 plugin ad-hoc D-Bus: fix deprecated use of python-dbus:
the plugin was using python-dbus which is deprecated in the backend in the favor of
TxDBus. Methods calls have been updated, and the plugin works again, but there seems to be
still some issues (warnings in the logs). Those will be fixed later.
2023-12-01 15:22:55 +01:00
Goffi
3c35dea8b1 plugin XEP-0424: message retraction update:
- follow specification update (with namespace bump)
- retract from history on message reception for group chat
- send bridge message
2023-11-30 13:23:53 +01:00
Goffi
ee4caf8ee7 template: add a bare_jid filter 2023-11-28 17:41:49 +01:00
Goffi
67e8367ff3 plugin XEP-0384: fix trigger used for OLDMEMO:
OLDMEMO was applied at the `send_message_data` trigger level, however this was missing
stanza constructed without message data (which is notably the case for XEP-0308). This has
been fixed by using the `send` trigger instead. As a side effect, the same code is now
used for TWOMEMO and OLDMEMO, making it simpler.
2023-11-28 17:41:02 +01:00
Goffi
85cecd3d30 plugin XEP-0308: implement Last Message Correction 2023-11-28 17:38:31 +01:00
Goffi
c9c886480e models (core): separate MessageEditData from MessageEdition:
`MessageEditData` is used to carry a new `MessageData` when an edition has happened, while
`MessageEdition` is used to send changes to do for a new edition.
2023-11-28 17:37:02 +01:00
Goffi
445d5c088e core (memory/sqla_mapping): delete-orphan in History:
add `cascade=delete-orphan` to History's `messages`, `subjects` and `thread`, to make
modification of those attributes easier.
2023-11-28 17:35:20 +01:00
Goffi
191d06126e core (memory/sqla): add id filter in history_get 2023-11-28 17:26:45 +01:00
Goffi
70f3502429 core (memory/memory): fix the use of empty from_jid and to_jid in history_get 2023-11-28 17:25:47 +01:00
Goffi
39dc28fedf tools (common/data_objects): expose message's extra field. 2023-11-22 15:11:25 +01:00
Goffi
2b501c70d7 plugin XEP-0444: complete implementation:
"Message Reactions" implementation is now working and updating history. The
`message_reactions_set` bridge method can be used by frontend to `replace`, `add`,
`remove` or `toggle` reactions. History is properly updated, and signal are sent when
necessary.
2023-11-22 15:10:04 +01:00
Goffi
9d6158da2b plugin XEP-0359: use same ID as <message> for origin_id:
even if the XEP doesn't specify if Message ID must be the same as `origin_id`, using a
different one makes little sense, and is leading to bugs in other implementation (e.g.
Movim using the wrong ID for reactions).
2023-11-22 15:05:41 +01:00
Goffi
436848048a plugin XEP-0045: user normal workflow for history + get_room_user_jid method:
- workflow is now using the normal messages workflow even for history message: previous
  workflow was dedicated to MUC and only adding message to history, resulting in other
  plugins being skipped.
- new `get_room_user_jid` helps to retrieve easily the JID currently used in a joined
  room.
2023-11-22 15:00:57 +01:00
Goffi
f91c2be526 plugin XEP-0313: better error logging + store last stanza ID when retrieving archives + small improvments 2023-11-22 14:56:14 +01:00
Goffi
2e638b26fc plugin XEP-0280: minor parsing improvement. 2023-11-22 14:53:07 +01:00
Goffi
5bb47c69e4 core (memory/sqla_mapping): add a version_id column to detect race conditions. 2023-11-22 14:52:00 +01:00
Goffi
b8854ad46c core (xmpp): message reception workflow refactoring:
- Call methods from a root async one instead of using Deferred callbacks chain.
- Use a queue to be sure to process messages in order.
2023-11-22 14:50:35 +01:00