slidge 0.2.8__tar.gz → 0.2.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {slidge-0.2.8 → slidge-0.2.10}/.gitignore +1 -0
- {slidge-0.2.8 → slidge-0.2.10}/.woodpecker/container-ci.yaml +13 -9
- slidge-0.2.10/.woodpecker/docs.yaml +22 -0
- {slidge-0.2.8 → slidge-0.2.10}/.woodpecker/package.yaml +6 -9
- {slidge-0.2.8 → slidge-0.2.10}/.woodpecker/test.yaml +12 -13
- slidge-0.2.10/Dockerfile +43 -0
- slidge-0.2.10/PKG-INFO +133 -0
- {slidge-0.2.8 → slidge-0.2.10}/README.md +7 -8
- slidge-0.2.10/dev/confs/slidge-dev.ini +8 -0
- slidge-0.2.10/dev/hot-reload.sh +8 -0
- slidge-0.2.10/docker-compose.yml +20 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/attachments.rst +1 -1
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/config/index.rst +1 -1
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/daemon.rst +2 -2
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/register.rst +4 -0
- {slidge-0.2.8 → slidge-0.2.10}/pyproject.toml +6 -10
- {slidge-0.2.8 → slidge-0.2.10}/slidge/__init__.py +9 -1
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/admin.py +3 -3
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/gateway.py +6 -3
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/attachment.py +2 -2
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/pubsub.py +6 -2
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/store.py +1 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/group/participant.py +2 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/group/room.py +6 -3
- {slidge-0.2.8 → slidge-0.2.10}/slidge/main.py +15 -9
- slidge-0.2.10/slidge/slixfix/__init__.py +141 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/conf.py +14 -4
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/types.py +1 -7
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/util.py +0 -13
- slidge-0.2.10/slidge.egg-info/PKG-INFO +133 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge.egg-info/SOURCES.txt +3 -3
- {slidge-0.2.8 → slidge-0.2.10}/slidge.egg-info/requires.txt +1 -1
- slidge-0.2.10/superduper/__main__.py +3 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_muc.py +3 -0
- slidge-0.2.10/uv.lock +1665 -0
- slidge-0.2.8/.woodpecker/container-cache.yml +0 -71
- slidge-0.2.8/.woodpecker/container.yml +0 -49
- slidge-0.2.8/.woodpecker/docs.yaml +0 -24
- slidge-0.2.8/Dockerfile +0 -94
- slidge-0.2.8/PKG-INFO +0 -793
- slidge-0.2.8/docker-compose.yml +0 -69
- slidge-0.2.8/slidge/__version__.py +0 -5
- slidge-0.2.8/slidge/slixfix/__init__.py +0 -92
- slidge-0.2.8/slidge.egg-info/PKG-INFO +0 -793
- slidge-0.2.8/uv.lock +0 -1615
- {slidge-0.2.8 → slidge-0.2.10}/.pre-commit-config.yaml +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/LICENSE +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/commitlint.config.js +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/assets/5x5.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/assets/slidge-color-small.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/assets/slidge-color.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/assets/slidge-mono-black.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/assets/slidge-mono-white.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/assets/slidge.svg +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/confs/movim.env +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/confs/nginx.conf +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/confs/slidge-example.ini +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/dev/prettify_tests.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/doap.xml +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/Makefile +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/component.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/examples/ejabberd.yaml +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/examples/index.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/examples/prosody.cfg.lua +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/index.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/install.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/note.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/admin/privilege.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/codeberg.svg +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/conf.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/dev/contributing.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/dev/design.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/dev/howto.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/dev/index.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/dev/tutorial.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/glossary.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/index.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/commands.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/contacts.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/foxyproxy.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/gajim.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/index.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/low_profile.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/movim1.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/movim2.png +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/docs/source/user/note.rst +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/setup.cfg +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/__main__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/adhoc.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/base.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/categories.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/chat_command.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/register.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/command/user.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/contact/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/contact/contact.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/contact/roster.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/config.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/caps.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/disco.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/message/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/message/chat_state.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/message/marker.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/message/message.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/muc/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/muc/admin.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/muc/mam.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/muc/misc.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/muc/owner.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/muc/ping.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/presence.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/registration.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/search.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/session_dispatcher.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/util.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/dispatcher/vcard.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/avatar.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/base.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/db.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/disco.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/lock.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/message.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/message_maker.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/message_text.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/presence.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/mixins/recipient.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/core/session.py +2 -2
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/env.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/script.py.mako +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/04cf35e3cf85_add_participant_nickname_no_illegal.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/09f27f098baa_add_missing_attributes_in_room.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/15b0bd83407a_remove_bogus_unique_constraints_on_room_.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/2461390c0af2_store_contacts_caps_verstring_in_db.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/29f5280c61aa_store_subject_setter_in_room.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/2b1f45ab7379_store_room_subject_setter_by_nickname.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/3071e0fa69d4_add_contact_client_type.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/45c24cc73c91_add_bob.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/5bd48bfdffa2_lift_room_legacy_id_constraint.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/82a4af84b679_add_muc_history_filled.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/8b993243a536_add_vcard_content_to_contact_table.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/8d2ced764698_rely_on_db_to_store_contacts_rooms_and_.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/aa9d82a7f6ef_db_creation.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/abba1ae0edb3_store_avatar_legacy_id_in_the_contact_.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/b33993e87db3_move_everything_to_persistent_db.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/b64b1a793483_add_source_and_legacy_id_for_archived_.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/c4a8ec35a0e8_per_room_user_nick.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/alembic/versions/e91195719c2c_store_users_avatars_persistently.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/avatar.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/meta.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/db/models.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/group/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/group/archive.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/group/bookmarks.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/migration.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/py.typed +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/delivery_receipt.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/link_preview/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/link_preview/link_preview.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/link_preview/stanza.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/roster.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0077/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0077/register.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0077/stanza.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0100/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0100/gateway.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0100/stanza.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0153/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0153/vcard_avatar.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0292/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/slixfix/xep_0292/vcard4.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/archive_msg.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/jid_escaping.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge/util/test.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge.egg-info/dependency_links.txt +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge.egg-info/entry_points.txt +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/slidge.egg-info/top_level.txt +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/__init__.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/contact.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/gateway.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/group.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/legacy_client.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/session.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/superduper/util.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/conftest.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_adhoc/test_access.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_adhoc/test_confirmation.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_adhoc/test_form.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_adhoc/test_reported.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_attachment.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_avatar.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_backfill.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_chat_commands.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_config.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_db/test_store.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_db/test_user.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_feature_restriction.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_mam_archivable.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_mds.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_name_in_constructor.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_resourceprep.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_session.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_session_2.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_set_name_before_fill.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_shakespeare.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_stanza_link_preview.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_util.py +0 -0
- {slidge-0.2.8 → slidge-0.2.10}/tests/test_vcard.py +0 -0
@@ -1,9 +1,12 @@
|
|
1
1
|
# Build a container with a virtualenv that can be used for tests and to build docs.
|
2
2
|
|
3
3
|
when:
|
4
|
-
event: [
|
5
|
-
|
6
|
-
|
4
|
+
event: [ push ]
|
5
|
+
branch: main
|
6
|
+
path:
|
7
|
+
- Dockerfile
|
8
|
+
- pyproject.toml
|
9
|
+
- uv.lock
|
7
10
|
|
8
11
|
matrix:
|
9
12
|
PYTHON_VERSION:
|
@@ -11,19 +14,20 @@ matrix:
|
|
11
14
|
- "3.12"
|
12
15
|
- "3.13"
|
13
16
|
|
17
|
+
labels:
|
18
|
+
platform: linux/amd64
|
19
|
+
|
14
20
|
steps:
|
15
21
|
build-and-push:
|
16
22
|
image: woodpeckerci/plugin-docker-buildx
|
17
23
|
settings:
|
18
|
-
repo: codeberg.org
|
24
|
+
repo: codeberg.org/slidge/slidge
|
19
25
|
registry: codeberg.org
|
20
26
|
build_args:
|
21
27
|
PYTHONVER: "${PYTHON_VERSION}"
|
22
|
-
tag:
|
23
|
-
target:
|
28
|
+
tag: ci-${PYTHON_VERSION}
|
29
|
+
target: ci
|
24
30
|
username: slidge
|
25
31
|
password:
|
26
32
|
from_secret: CODEBERG_TOKEN
|
27
|
-
cache_from: codeberg.org/slidge/slidge
|
28
|
-
cache_images:
|
29
|
-
- codeberg.org/slidge/woodpecker-slidge:buildcache-${PYTHON_VERSION}
|
33
|
+
cache_from: codeberg.org/slidge/slidge:buildcache
|
@@ -0,0 +1,22 @@
|
|
1
|
+
when:
|
2
|
+
event: [ push, tag ]
|
3
|
+
path: [ "slidge/**/*.py", "superduper/**/*.py", "docs/**/*" ]
|
4
|
+
|
5
|
+
labels:
|
6
|
+
platform: linux/amd64
|
7
|
+
|
8
|
+
steps:
|
9
|
+
build:
|
10
|
+
image: codeberg.org/slidge/slidge:ci-3.13
|
11
|
+
pull: true
|
12
|
+
commands:
|
13
|
+
- uv sync --all-groups --all-extras
|
14
|
+
- cd docs
|
15
|
+
- make html
|
16
|
+
|
17
|
+
publish:
|
18
|
+
image: codeberg.org/slidge/woodpecker-publish-pages
|
19
|
+
pull: true
|
20
|
+
settings:
|
21
|
+
token:
|
22
|
+
from_secret: CODEBERG_TOKEN
|
@@ -1,18 +1,19 @@
|
|
1
1
|
# Build a source dist and a wheel.
|
2
2
|
|
3
3
|
when:
|
4
|
-
event: [ push, tag
|
4
|
+
event: [ push, tag ]
|
5
5
|
path: [ "slidge/**/*", "pyproject.toml", "uv.lock", "README.md" ]
|
6
|
+
branch: main
|
7
|
+
|
8
|
+
labels:
|
9
|
+
platform: linux/amd64
|
6
10
|
|
7
11
|
# We do not need to build several packages for several python versions
|
8
12
|
# since slidge is pure python.
|
9
13
|
variables:
|
10
|
-
- &image codeberg.org/slidge/
|
14
|
+
- &image codeberg.org/slidge/slidge:ci-3.13
|
11
15
|
|
12
16
|
steps:
|
13
|
-
version:
|
14
|
-
image: codeberg.org/slidge/woodpecker-version
|
15
|
-
|
16
17
|
changelog:
|
17
18
|
image: codeberg.org/slidge/woodpecker-generate-changelog
|
18
19
|
pull: true
|
@@ -23,8 +24,6 @@ steps:
|
|
23
24
|
- uv build
|
24
25
|
|
25
26
|
codeberg-pypi:
|
26
|
-
when:
|
27
|
-
event: [ push, tag ]
|
28
27
|
image: *image
|
29
28
|
environment:
|
30
29
|
CODEBERG_TOKEN:
|
@@ -34,7 +33,6 @@ steps:
|
|
34
33
|
|
35
34
|
pypi:
|
36
35
|
when:
|
37
|
-
branch: main
|
38
36
|
event: tag
|
39
37
|
image: *image
|
40
38
|
environment:
|
@@ -45,7 +43,6 @@ steps:
|
|
45
43
|
|
46
44
|
codeberg-release:
|
47
45
|
when:
|
48
|
-
branch: main
|
49
46
|
event: tag
|
50
47
|
image: woodpeckerci/plugin-release
|
51
48
|
settings:
|
@@ -8,7 +8,11 @@ matrix:
|
|
8
8
|
- "3.12"
|
9
9
|
- "3.13"
|
10
10
|
|
11
|
+
labels:
|
12
|
+
platform: linux/amd64
|
13
|
+
|
11
14
|
variables:
|
15
|
+
- &ci-image codeberg.org/slidge/slidge:ci-${PYTHON_VERSION}
|
12
16
|
- &only-once
|
13
17
|
when:
|
14
18
|
matrix:
|
@@ -16,44 +20,39 @@ variables:
|
|
16
20
|
event: push
|
17
21
|
|
18
22
|
steps:
|
19
|
-
# This is often a no-op, but since we manually build the woodpecker-slidge:3.x images,
|
20
|
-
# their venv may be out of date, even if uv.lock is not modified.
|
21
23
|
update-venv:
|
22
|
-
image:
|
24
|
+
image: *ci-image
|
23
25
|
pull: true
|
24
26
|
commands:
|
25
|
-
-
|
26
|
-
- uv venv --allow-existing .venv
|
27
|
-
- uv export > req.txt
|
28
|
-
- uv pip install --requirements req.txt
|
27
|
+
- uv sync --all-groups --all-extras
|
29
28
|
|
30
29
|
ruff:
|
31
|
-
image:
|
30
|
+
image: *ci-image
|
32
31
|
commands:
|
33
32
|
- ruff check
|
34
33
|
- ruff format --check
|
35
34
|
|
36
35
|
mypy:
|
37
|
-
image:
|
36
|
+
image: *ci-image
|
38
37
|
commands:
|
39
38
|
- mypy
|
40
39
|
|
41
40
|
test:
|
42
|
-
image:
|
41
|
+
image: *ci-image
|
43
42
|
commands:
|
44
43
|
- coverage run -m pytest tests
|
45
44
|
- coverage report | tee coverage.txt
|
46
45
|
- coverage html
|
47
46
|
|
48
|
-
badge:
|
49
|
-
image:
|
47
|
+
coverage-badge:
|
48
|
+
image: *ci-image
|
50
49
|
commands:
|
51
50
|
- uv pip install pybadges
|
52
51
|
- COVERAGE=$(tail -n1 coverage.txt | awk 'NF>1{print $NF}')
|
53
52
|
- python -m pybadges --left-text=coverage --right-text=$COVERAGE --right-color=green > htmlcov/coverage.svg || true
|
54
53
|
<<: *only-once
|
55
54
|
|
56
|
-
publish:
|
55
|
+
coverage-publish:
|
57
56
|
image: codeberg.org/slidge/woodpecker-publish-pages
|
58
57
|
pull: true
|
59
58
|
settings:
|
slidge-0.2.10/Dockerfile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
ARG PYTHONVER=3.13
|
2
|
+
ARG DISTRO=bookworm-slim
|
3
|
+
|
4
|
+
## Install dependencies in a virtual env
|
5
|
+
FROM ghcr.io/astral-sh/uv:python$PYTHONVER-$DISTRO AS builder
|
6
|
+
ENV UV_PROJECT_ENVIRONMENT=/venv
|
7
|
+
RUN uv venv $UV_PROJECT_ENVIRONMENT
|
8
|
+
COPY uv.lock pyproject.toml .
|
9
|
+
RUN uv sync --all-groups --all-extras --no-install-project
|
10
|
+
|
11
|
+
## CI environment for slidge, where we move /venv to .venv
|
12
|
+
FROM ghcr.io/astral-sh/uv:python$PYTHONVER-$DISTRO AS ci
|
13
|
+
ENV UV_LINK_MODE=copy
|
14
|
+
ENV UV_PROJECT_ENVIRONMENT=/woodpecker/src/codeberg.org/slidge/slidge/.venv
|
15
|
+
ENV PATH="$UV_PROJECT_ENVIRONMENT/bin:$PATH"
|
16
|
+
RUN apt-get update -y && \
|
17
|
+
apt-get install -y --no-install-recommends \
|
18
|
+
git \
|
19
|
+
make \
|
20
|
+
&& rm -rf /var/lib/apt/lists/*
|
21
|
+
COPY --from=builder /root/.cache /root/.cache
|
22
|
+
|
23
|
+
## Dev container
|
24
|
+
FROM builder AS dev
|
25
|
+
ENV PATH="/venv/bin:$PATH"
|
26
|
+
ENV PYTHONUNBUFFERED=1
|
27
|
+
# libmagic1: to guess mime type from files
|
28
|
+
# media-types: to determine file name suffix based on file type
|
29
|
+
RUN apt-get update -y && \
|
30
|
+
apt-get install -y --no-install-recommends \
|
31
|
+
libmagic1 \
|
32
|
+
media-types \
|
33
|
+
shared-mime-info \
|
34
|
+
&& rm -rf /var/lib/apt/lists/*
|
35
|
+
# prosody certificate for localhost
|
36
|
+
COPY --from=codeberg.org/slidge/prosody-slidge-dev:latest \
|
37
|
+
/etc/prosody/certs/localhost.crt \
|
38
|
+
/usr/local/share/ca-certificates/
|
39
|
+
RUN update-ca-certificates
|
40
|
+
RUN pip install watchdog[watchmedo]
|
41
|
+
WORKDIR /io
|
42
|
+
COPY ./dev/hot-reload.sh .
|
43
|
+
ENTRYPOINT ["./hot-reload.sh"]
|
slidge-0.2.10/PKG-INFO
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: slidge
|
3
|
+
Version: 0.2.10
|
4
|
+
Summary: XMPP bridging framework
|
5
|
+
Author-email: Nicolas Cedilnik <nicoco@nicoco.fr>
|
6
|
+
License-Expression: AGPL-3.0-or-later
|
7
|
+
Project-URL: Homepage, https://codeberg.org/slidge/
|
8
|
+
Project-URL: Issues, https://codeberg.org/slidge/slidge/issues
|
9
|
+
Project-URL: Repository, https://codeberg.org/slidge/slidge/
|
10
|
+
Project-URL: Chat room, https://conference.nicoco.fr:5281/muc_log/slidge/
|
11
|
+
Project-URL: Documentation, https://slidge.im/docs/slidge/main
|
12
|
+
Project-URL: changelog, https://codeberg.org/slidge/slidge/releases
|
13
|
+
Keywords: xmpp,gateway,bridge,instant messaging
|
14
|
+
Classifier: Topic :: Internet :: XMPP
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
16
|
+
Requires-Python: >=3.11
|
17
|
+
Description-Content-Type: text/markdown
|
18
|
+
License-File: LICENSE
|
19
|
+
Requires-Dist: aiohttp[speedups]<4,>=3.11.11
|
20
|
+
Requires-Dist: alembic<2,>=1.14.0
|
21
|
+
Requires-Dist: configargparse<2,>=1.7
|
22
|
+
Requires-Dist: defusedxml>=0.7.1
|
23
|
+
Requires-Dist: pillow<12,>=11.0.0
|
24
|
+
Requires-Dist: python-magic<0.5,>=0.4.27
|
25
|
+
Requires-Dist: qrcode<9,>=8.0
|
26
|
+
Requires-Dist: slixmpp<2,>=1.10.0
|
27
|
+
Requires-Dist: sqlalchemy<3,>=2
|
28
|
+
Requires-Dist: thumbhash>=0.1.2
|
29
|
+
Dynamic: license-file
|
30
|
+
|
31
|
+

|
32
|
+
|
33
|
+
[](https://ci.codeberg.org/repos/14027)
|
34
|
+
[](https://slidge.im/coverage/slidge/main)
|
35
|
+
[](https://conference.nicoco.fr:5281/muc_log/slidge/)
|
36
|
+
|
37
|
+
Slidge is an XMPP (puppeteer) gateway library in python.
|
38
|
+
It makes
|
39
|
+
[writing gateways to other chat networks](https://slidge.im/docs/slidge/main/dev/tutorial.html)
|
40
|
+
(*legacy modules*) as frictionless as possible.
|
41
|
+
It supports fancy IM features, such as
|
42
|
+
[(emoji) reactions](https://xmpp.org/extensions/xep-0444.html),
|
43
|
+
[replies](https://xmpp.org/extensions/xep-0461.html), and
|
44
|
+
[retractions](https://xmpp.org/extensions/xep-0424.html).
|
45
|
+
The full list of supported XEPs in on [xmpp.org](https://xmpp.org/software/slidge/).
|
46
|
+
|
47
|
+
Status
|
48
|
+
------
|
49
|
+
|
50
|
+
Slidge is **beta**-grade software. It support groups and 1:1 chats.
|
51
|
+
Try slidge and give us some
|
52
|
+
feedback, through the [MUC](xmpp:slidge@conference.nicoco.fr?join) or the
|
53
|
+
[issue tracker](https://codeberg.org/slidge/slidge/issues).
|
54
|
+
Don't be shy!
|
55
|
+
|
56
|
+
Usage
|
57
|
+
-----
|
58
|
+
|
59
|
+
A minimal (and fictional!) slidge-powered "legacy module" looks like this:
|
60
|
+
|
61
|
+
```python
|
62
|
+
from cool_chat_lib import CoolClient
|
63
|
+
from slidge import BaseGateway, BaseSession
|
64
|
+
from slidge.contact import LegacyContact
|
65
|
+
from slidge.group import LegacyMUC
|
66
|
+
from slidge.db import GatewayUser
|
67
|
+
|
68
|
+
|
69
|
+
class Gateway(BaseGateway):
|
70
|
+
# Various aspects of the gateway component are configured as class
|
71
|
+
# attributes of the concrete Gateway class
|
72
|
+
COMPONENT_NAME = "Gateway to the super duper chat network"
|
73
|
+
|
74
|
+
|
75
|
+
class Session(BaseSession):
|
76
|
+
def __init__(self, user: GatewayUser):
|
77
|
+
super().__init__(user)
|
78
|
+
self.legacy_client = CoolClient(
|
79
|
+
login=user.legacy_module_data["username"],
|
80
|
+
password=user.legacy_module_data["password"],
|
81
|
+
)
|
82
|
+
|
83
|
+
async def on_text(self, chat: LegacyContact | LegacyMUC, text: str, **kwargs):
|
84
|
+
"""
|
85
|
+
Triggered when the slidge user sends an XMPP message through the gateway
|
86
|
+
"""
|
87
|
+
self.legacy_client.send_message(text=text, destination=chat.legacy_id)
|
88
|
+
```
|
89
|
+
|
90
|
+
There's more in [the tutorial](https://slidge.im/docs/slidge/main/dev/tutorial.html)!
|
91
|
+
|
92
|
+
Installation
|
93
|
+
------------
|
94
|
+
|
95
|
+
⚠️ Slidge is a lib for gateway developers, if you are an XMPP server admin and
|
96
|
+
want to install gateways on your server, you are looking for a
|
97
|
+
[slidge-based gateway](https://codeberg.org/explore/repos?q=slidge&topic=1).
|
98
|
+
or the
|
99
|
+
[slidge-debian](https://git.sr.ht/~nicoco/slidge-debian)
|
100
|
+
bundle.
|
101
|
+
|
102
|
+
[](https://pypi.org/project/slidge/)
|
103
|
+
|
104
|
+
[](https://repology.org/project/slidge/versions)
|
105
|
+
|
106
|
+
Slidge is available on
|
107
|
+
[codeberg](https://codeberg.org/slidge/slidge/releases)
|
108
|
+
and [pypi](https://pypi.org/project/slidge/).
|
109
|
+
Refer to [the docs](https://slidge.im/docs/slidge/main/admin/install.html) for details.
|
110
|
+
|
111
|
+
About privacy
|
112
|
+
-------------
|
113
|
+
|
114
|
+
Slidge (and most if not all XMPP gateway that I know of) will break
|
115
|
+
end-to-end encryption, or more precisely one of the 'ends' become the
|
116
|
+
gateway itself. If privacy is a major concern for you, my advice would
|
117
|
+
be to:
|
118
|
+
|
119
|
+
- use XMPP + OMEMO
|
120
|
+
- self-host your gateways
|
121
|
+
- have your gateways hosted by someone you know AFK and trust
|
122
|
+
|
123
|
+
Related projects
|
124
|
+
----------------
|
125
|
+
|
126
|
+
- [Spectrum](https://www.spectrum.im/)
|
127
|
+
- [telegabber](https://dev.narayana.im/narayana/telegabber)
|
128
|
+
- [biboumi](https://biboumi.louiz.org/)
|
129
|
+
- [Bifröst](https://github.com/matrix-org/matrix-bifrost)
|
130
|
+
- [Mautrix](https://github.com/mautrix)
|
131
|
+
- [matterbridge](https://github.com/42wim/matterbridge)
|
132
|
+
|
133
|
+
Thank you, [Trung](https://trung.fun/), for the slidge logo!
|
@@ -1,13 +1,8 @@
|
|
1
1
|

|
2
2
|
|
3
|
-
[](https://conference.nicoco.fr:5281/muc_log/slidge/)
|
4
|
-
|
5
|
-
|
6
3
|
[](https://ci.codeberg.org/repos/14027)
|
7
|
-
[](https://slidge.im/coverage/main)
|
8
|
-
|
9
|
-
[](https://pypi.org/project/slidge/)
|
10
|
-
[](https://packages.debian.org/unstable/python3-slidge)
|
4
|
+
[](https://slidge.im/coverage/slidge/main)
|
5
|
+
[](https://conference.nicoco.fr:5281/muc_log/slidge/)
|
11
6
|
|
12
7
|
Slidge is an XMPP (puppeteer) gateway library in python.
|
13
8
|
It makes
|
@@ -74,8 +69,12 @@ or the
|
|
74
69
|
[slidge-debian](https://git.sr.ht/~nicoco/slidge-debian)
|
75
70
|
bundle.
|
76
71
|
|
72
|
+
[](https://pypi.org/project/slidge/)
|
73
|
+
|
74
|
+
[](https://repology.org/project/slidge/versions)
|
75
|
+
|
77
76
|
Slidge is available on
|
78
|
-
[codeberg](https://codeberg.org/slidge
|
77
|
+
[codeberg](https://codeberg.org/slidge/slidge/releases)
|
79
78
|
and [pypi](https://pypi.org/project/slidge/).
|
80
79
|
Refer to [the docs](https://slidge.im/docs/slidge/main/admin/install.html) for details.
|
81
80
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
services:
|
2
|
+
superduper:
|
3
|
+
build:
|
4
|
+
context: .
|
5
|
+
target: dev
|
6
|
+
network_mode: service:prosody
|
7
|
+
volumes:
|
8
|
+
- ./slidge:/io/slidge
|
9
|
+
- ./superduper:/io/superduper
|
10
|
+
- ./dev/assets:/io/superduper/assets
|
11
|
+
- ./persistent:/var/lib/slidge/slidge.localhost
|
12
|
+
- ./dev/confs/slidge-dev.ini:/etc/slidge/slidge.ini
|
13
|
+
depends_on:
|
14
|
+
- prosody
|
15
|
+
|
16
|
+
prosody:
|
17
|
+
image: codeberg.org/slidge/prosody-slidge-dev:latest
|
18
|
+
ports:
|
19
|
+
- "127.0.0.1:5281:5281" # prosody's https://...
|
20
|
+
- "127.0.0.1:5222:5222" # XMPP
|
@@ -4,7 +4,7 @@ Configuration
|
|
4
4
|
.. include:: ../note.rst
|
5
5
|
|
6
6
|
.. note::
|
7
|
-
For the debian package, just edit the ``/etc/slidge/conf.d/common.conf`` and
|
7
|
+
For the debian unofficial package, just edit the ``/etc/slidge/conf.d/common.conf`` and
|
8
8
|
``/etc/slidge/*.conf`` files, and use :ref:`Debian packages (systemd)` to
|
9
9
|
launch slidge.
|
10
10
|
|
@@ -76,10 +76,10 @@ Give permission for this user to use subuids and subgids (as root, required for
|
|
76
76
|
|
77
77
|
.. code-block:: bash
|
78
78
|
|
79
|
-
usermod --add-subuids 200000-
|
79
|
+
usermod --add-subuids 200000-210000 --add-subgids 200000-210000 slidge
|
80
80
|
|
81
81
|
.. warning::
|
82
|
-
Check that the 200000-
|
82
|
+
Check that the 200000-210000 range does not overlap with any other user's range
|
83
83
|
in ``/etc/subuid`` and ``/etc/subgid``
|
84
84
|
|
85
85
|
Enable lingering for this user so that its systemd user services start on startup (as root):
|
@@ -45,3 +45,7 @@ Other clients
|
|
45
45
|
|
46
46
|
Other clients might have different UIs, but you can always fall back to the
|
47
47
|
"register" :term:`Chatbot Command`.
|
48
|
+
|
49
|
+
In your XMPP client, start a new conversation with
|
50
|
+
JID ``superduper.example.org``.
|
51
|
+
Type "register" and follow the instructions.
|
@@ -10,29 +10,31 @@ dependencies = [
|
|
10
10
|
"pillow>=11.0.0,<12",
|
11
11
|
"python-magic>=0.4.27,<0.5",
|
12
12
|
"qrcode>=8.0,<9",
|
13
|
-
"slixmpp>=1.
|
13
|
+
"slixmpp>=1.10.0,<2",
|
14
14
|
"sqlalchemy>=2,<3",
|
15
15
|
"thumbhash>=0.1.2",
|
16
16
|
]
|
17
17
|
authors = [
|
18
18
|
{name = "Nicolas Cedilnik", email = "nicoco@nicoco.fr"},
|
19
19
|
]
|
20
|
-
license =
|
20
|
+
license = "AGPL-3.0-or-later"
|
21
21
|
classifiers = [
|
22
22
|
"Topic :: Internet :: XMPP",
|
23
23
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
24
24
|
]
|
25
25
|
keywords = ["xmpp", "gateway", "bridge", "instant messaging"]
|
26
|
-
|
26
|
+
dynamic = ["version"]
|
27
27
|
readme = "README.md"
|
28
28
|
|
29
29
|
[build-system]
|
30
|
-
requires = ["setuptools", "setuptools-scm"]
|
30
|
+
requires = ["setuptools>=64", "setuptools-scm>=8"]
|
31
31
|
build-backend = "setuptools.build_meta"
|
32
32
|
|
33
33
|
[tool.setuptools.packages.find]
|
34
34
|
include = ["slidge*"]
|
35
35
|
|
36
|
+
[tool.setuptools_scm]
|
37
|
+
|
36
38
|
[project.scripts]
|
37
39
|
slidge = 'slidge.main:main'
|
38
40
|
|
@@ -111,12 +113,6 @@ name = "codeberg"
|
|
111
113
|
url = "https://codeberg.org/api/packages/slidge/pypi/simple"
|
112
114
|
publish-url = "https://codeberg.org/api/packages/slidge/pypi"
|
113
115
|
|
114
|
-
[tool.setuptools]
|
115
|
-
# FIXME: remove this when the setuptools upstream bug is fixed
|
116
|
-
# https://github.com/astral-sh/uv/issues/9513#issuecomment-2519527822
|
117
|
-
license-files = []
|
118
|
-
|
119
|
-
|
120
116
|
[tool.git-cliff.remote.gitea]
|
121
117
|
owner = "slidge"
|
122
118
|
repo = "slidge"
|
@@ -6,6 +6,7 @@ Contains importable classes for a minimal function :term:`Legacy Module`.
|
|
6
6
|
|
7
7
|
import sys
|
8
8
|
import warnings
|
9
|
+
from importlib.metadata import PackageNotFoundError, version
|
9
10
|
|
10
11
|
from . import slixfix # noqa: F401
|
11
12
|
from .command import FormField, SearchResult # noqa: F401
|
@@ -28,7 +29,7 @@ def entrypoint(module_name: str) -> None:
|
|
28
29
|
:param module_name: An importable :term:`Legacy Module`.
|
29
30
|
"""
|
30
31
|
sys.argv.extend(["--legacy", module_name])
|
31
|
-
main_func()
|
32
|
+
main_func(module_name)
|
32
33
|
|
33
34
|
|
34
35
|
def formatwarning(message, category, filename, lineno, line=""):
|
@@ -37,8 +38,15 @@ def formatwarning(message, category, filename, lineno, line=""):
|
|
37
38
|
|
38
39
|
warnings.formatwarning = formatwarning
|
39
40
|
|
41
|
+
try:
|
42
|
+
__version__ = version("slidge")
|
43
|
+
except PackageNotFoundError:
|
44
|
+
# package is not installed
|
45
|
+
__version__ = "dev"
|
46
|
+
|
40
47
|
|
41
48
|
__all__ = [
|
49
|
+
"__version__",
|
42
50
|
"BaseGateway",
|
43
51
|
"BaseSession",
|
44
52
|
# For backwards compatibility, these names are still importable from the
|
@@ -60,8 +60,6 @@ class SlidgeInfo(AdminCommand):
|
|
60
60
|
ACCESS = CommandAccess.ANY
|
61
61
|
|
62
62
|
async def run(self, _session, _ifrom, *_):
|
63
|
-
from slidge.__version__ import __version__
|
64
|
-
|
65
63
|
start = self.xmpp.datetime_started # type:ignore
|
66
64
|
uptime = datetime.now() - start
|
67
65
|
|
@@ -100,8 +98,10 @@ class SlidgeInfo(AdminCommand):
|
|
100
98
|
legacy_module = importlib.import_module(config.LEGACY_MODULE)
|
101
99
|
version = getattr(legacy_module, "__version__", "No version")
|
102
100
|
|
101
|
+
import slidge
|
102
|
+
|
103
103
|
return (
|
104
|
-
f"{self.xmpp.COMPONENT_NAME} (slidge core {__version__},"
|
104
|
+
f"{self.xmpp.COMPONENT_NAME} (slidge core {slidge.__version__},"
|
105
105
|
f" {config.LEGACY_MODULE} {version})\n"
|
106
106
|
f"Up since {start:%Y-%m-%d %H:%M} ({ago} ago)"
|
107
107
|
)
|
@@ -31,6 +31,7 @@ from slidge.core.pubsub import PubSubComponent
|
|
31
31
|
from slidge.core.session import BaseSession
|
32
32
|
from slidge.db import GatewayUser, SlidgeStore
|
33
33
|
from slidge.db.avatar import avatar_cache
|
34
|
+
from slidge.slixfix import PrivilegedIqError
|
34
35
|
from slidge.slixfix.delivery_receipt import DeliveryReceipt
|
35
36
|
from slidge.slixfix.roster import RosterBackend
|
36
37
|
from slidge.util import ABCSubclassableOnceAtMost
|
@@ -474,11 +475,12 @@ class BaseGateway(
|
|
474
475
|
"create the MDS node of %s",
|
475
476
|
user_jid,
|
476
477
|
)
|
477
|
-
except
|
478
|
+
except PrivilegedIqError as exc:
|
479
|
+
nested = exc.nested_error()
|
478
480
|
# conflict this means the node already exists, we can ignore that
|
479
|
-
if
|
481
|
+
if nested is not None and nested.condition != "conflict":
|
480
482
|
log.exception(
|
481
|
-
"Could not create the MDS node of %s", user_jid, exc_info=
|
483
|
+
"Could not create the MDS node of %s", user_jid, exc_info=exc
|
482
484
|
)
|
483
485
|
except Exception as e:
|
484
486
|
log.exception(
|
@@ -526,6 +528,7 @@ class BaseGateway(
|
|
526
528
|
"You are not connected to this gateway! "
|
527
529
|
f"Maybe this message will tell you why: {e}"
|
528
530
|
)
|
531
|
+
session.logged = False
|
529
532
|
return
|
530
533
|
|
531
534
|
log.info("Login success for %s", session.user_jid)
|
@@ -46,7 +46,7 @@ class AttachmentMixin(TextMessageMixin):
|
|
46
46
|
file_path: Path,
|
47
47
|
file_name: Optional[str] = None,
|
48
48
|
content_type: Optional[str] = None,
|
49
|
-
):
|
49
|
+
) -> str | None:
|
50
50
|
if file_name and file_path.name != file_name:
|
51
51
|
d = Path(tempfile.mkdtemp())
|
52
52
|
temp = d / file_name
|
@@ -215,7 +215,7 @@ class AttachmentMixin(TextMessageMixin):
|
|
215
215
|
else:
|
216
216
|
local_path = file_path
|
217
217
|
new_url = await self.__upload(file_path, file_name, content_type)
|
218
|
-
if legacy_file_id:
|
218
|
+
if legacy_file_id and new_url is not None:
|
219
219
|
self.__store.set_url(self.session.user_pk, str(legacy_file_id), new_url)
|
220
220
|
|
221
221
|
return is_temp, local_path, new_url
|
@@ -11,7 +11,7 @@ from slixmpp import (
|
|
11
11
|
StanzaPath,
|
12
12
|
register_stanza_plugin,
|
13
13
|
)
|
14
|
-
from slixmpp.exceptions import XMPPError
|
14
|
+
from slixmpp.exceptions import IqError, IqTimeout, XMPPError
|
15
15
|
from slixmpp.plugins.base import BasePlugin, register_plugin
|
16
16
|
from slixmpp.plugins.xep_0060.stanza import Event, EventItem, EventItems, Item
|
17
17
|
from slixmpp.plugins.xep_0084 import Data as AvatarData
|
@@ -134,7 +134,11 @@ class PubSubComponent(NamedLockMixin, BasePlugin):
|
|
134
134
|
info = None
|
135
135
|
if info is None:
|
136
136
|
async with self.lock(from_):
|
137
|
-
|
137
|
+
try:
|
138
|
+
iq = await self.xmpp.plugin["xep_0030"].get_info(from_)
|
139
|
+
except (IqError, IqTimeout):
|
140
|
+
log.debug("Could get disco#info of %s, ignoring", from_)
|
141
|
+
return []
|
138
142
|
info = iq["disco_info"]
|
139
143
|
return info["features"]
|
140
144
|
|
@@ -1076,6 +1076,7 @@ class ParticipantStore(EngineMixin):
|
|
1076
1076
|
update(Participant)
|
1077
1077
|
.where(Participant.id == participant.pk)
|
1078
1078
|
.values(
|
1079
|
+
nickname=participant.nickname,
|
1079
1080
|
resource=participant.jid.resource,
|
1080
1081
|
nickname_no_illegal=participant._nickname_no_illegal,
|
1081
1082
|
affiliation=participant.affiliation,
|