slidge 0.2.4__tar.gz → 0.2.6__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {slidge-0.2.4 → slidge-0.2.6}/.woodpecker/package.yaml +5 -0
- {slidge-0.2.4 → slidge-0.2.6}/PKG-INFO +15 -15
- {slidge-0.2.4 → slidge-0.2.6}/README.md +4 -4
- slidge-0.2.6/commitlint.config.js +31 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/confs/slidge-example.ini +1 -1
- {slidge-0.2.4 → slidge-0.2.6}/doap.xml +6 -0
- slidge-0.2.6/docs/source/admin/note.rst +12 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/dev/tutorial.rst +2 -2
- slidge-0.2.6/docs/source/user/note.rst +13 -0
- {slidge-0.2.4 → slidge-0.2.6}/pyproject.toml +62 -11
- {slidge-0.2.4 → slidge-0.2.6}/slidge/__version__.py +1 -1
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/adhoc.py +8 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/base.py +6 -2
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/user.py +5 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/contact/contact.py +2 -8
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/config.py +12 -5
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/gateway.py +16 -4
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/attachment.py +1 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/message.py +6 -9
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/pubsub.py +2 -1
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/session.py +11 -3
- slidge-0.2.6/slidge/db/alembic/versions/04cf35e3cf85_add_participant_nickname_no_illegal.py +33 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/aa9d82a7f6ef_db_creation.py +0 -51
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/avatar.py +20 -1
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/models.py +1 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/store.py +5 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/group/participant.py +12 -1
- {slidge-0.2.4 → slidge-0.2.6}/slidge/group/room.py +1 -1
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/__init__.py +0 -2
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0100/gateway.py +1 -4
- {slidge-0.2.4 → slidge-0.2.6}/slidge/util/util.py +5 -1
- {slidge-0.2.4 → slidge-0.2.6}/slidge.egg-info/PKG-INFO +15 -15
- {slidge-0.2.4 → slidge-0.2.6}/slidge.egg-info/SOURCES.txt +1 -5
- slidge-0.2.6/slidge.egg-info/requires.txt +10 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/conftest.py +3 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_avatar.py +20 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_shakespeare.py +16 -95
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_util.py +0 -1
- {slidge-0.2.4 → slidge-0.2.6}/uv.lock +8 -53
- slidge-0.2.4/commitlint.config.js +0 -2
- slidge-0.2.4/docs/source/admin/note.rst +0 -12
- slidge-0.2.4/docs/source/user/note.rst +0 -13
- slidge-0.2.4/slidge/db/alembic/old_user_store.py +0 -183
- slidge-0.2.4/slidge/slixfix/xep_0356_old/__init__.py +0 -7
- slidge-0.2.4/slidge/slixfix/xep_0356_old/privilege.py +0 -167
- slidge-0.2.4/slidge/slixfix/xep_0356_old/stanza.py +0 -44
- slidge-0.2.4/slidge/util/db.py +0 -5
- slidge-0.2.4/slidge.egg-info/requires.txt +0 -11
- {slidge-0.2.4 → slidge-0.2.6}/.gitignore +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/.pre-commit-config.yaml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/.woodpecker/container-cache.yml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/.woodpecker/container-ci.yaml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/.woodpecker/container.yml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/.woodpecker/docs.yaml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/.woodpecker/test.yaml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/Dockerfile +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/LICENSE +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/assets/5x5.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/assets/slidge-color-small.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/assets/slidge-color.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/assets/slidge-mono-black.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/assets/slidge-mono-white.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/assets/slidge.svg +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/confs/movim.env +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/confs/nginx.conf +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/dev/prettify_tests.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docker-compose.yml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/Makefile +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/attachments.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/component.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/config/index.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/daemon.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/examples/ejabberd.yaml +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/examples/index.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/examples/prosody.cfg.lua +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/index.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/install.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/admin/privilege.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/codeberg.svg +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/conf.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/dev/contributing.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/dev/design.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/dev/howto.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/dev/index.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/glossary.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/index.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/commands.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/contacts.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/foxyproxy.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/gajim.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/index.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/low_profile.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/movim1.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/movim2.png +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/docs/source/user/register.rst +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/setup.cfg +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/__main__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/admin.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/categories.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/chat_command.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/command/register.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/contact/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/contact/roster.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/caps.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/disco.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/message/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/message/chat_state.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/message/marker.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/message/message.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/muc/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/muc/admin.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/muc/mam.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/muc/misc.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/muc/owner.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/muc/ping.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/presence.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/registration.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/search.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/session_dispatcher.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/util.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/dispatcher/vcard.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/avatar.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/base.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/db.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/disco.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/lock.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/message_maker.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/message_text.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/presence.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/core/mixins/recipient.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/env.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/script.py.mako +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/09f27f098baa_add_missing_attributes_in_room.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/15b0bd83407a_remove_bogus_unique_constraints_on_room_.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/2461390c0af2_store_contacts_caps_verstring_in_db.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/29f5280c61aa_store_subject_setter_in_room.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/2b1f45ab7379_store_room_subject_setter_by_nickname.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/3071e0fa69d4_add_contact_client_type.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/45c24cc73c91_add_bob.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/5bd48bfdffa2_lift_room_legacy_id_constraint.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/82a4af84b679_add_muc_history_filled.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/8b993243a536_add_vcard_content_to_contact_table.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/8d2ced764698_rely_on_db_to_store_contacts_rooms_and_.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/abba1ae0edb3_store_avatar_legacy_id_in_the_contact_.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/b33993e87db3_move_everything_to_persistent_db.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/b64b1a793483_add_source_and_legacy_id_for_archived_.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/c4a8ec35a0e8_per_room_user_nick.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/alembic/versions/e91195719c2c_store_users_avatars_persistently.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/db/meta.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/group/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/group/archive.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/group/bookmarks.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/main.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/migration.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/py.typed +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/delivery_receipt.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/link_preview/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/link_preview/link_preview.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/link_preview/stanza.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/roster.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0077/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0077/register.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0077/stanza.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0100/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0100/stanza.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0153/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0153/vcard_avatar.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0292/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0292/vcard4.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0492/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0492/notify.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/slixfix/xep_0492/stanza.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/util/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/util/archive_msg.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/util/conf.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/util/test.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge/util/types.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge.egg-info/dependency_links.txt +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge.egg-info/entry_points.txt +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/slidge.egg-info/top_level.txt +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/__init__.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/contact.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/gateway.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/group.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/legacy_client.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/session.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/superduper/util.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_adhoc/test_access.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_adhoc/test_confirmation.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_adhoc/test_form.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_adhoc/test_reported.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_attachment.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_backfill.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_chat_commands.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_config.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_db/test_store.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_db/test_user.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_feature_restriction.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_mds.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_muc.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_name_in_constructor.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_resourceprep.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_session.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_session_2.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_set_name_before_fill.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_stanza_link_preview.py +0 -0
- {slidge-0.2.4 → slidge-0.2.6}/tests/test_vcard.py +0 -0
@@ -13,6 +13,10 @@ steps:
|
|
13
13
|
version:
|
14
14
|
image: codeberg.org/slidge/woodpecker-version
|
15
15
|
|
16
|
+
changelog:
|
17
|
+
image: codeberg.org/slidge/woodpecker-generate-changelog
|
18
|
+
pull: true
|
19
|
+
|
16
20
|
build:
|
17
21
|
image: *image
|
18
22
|
commands:
|
@@ -49,3 +53,4 @@ steps:
|
|
49
53
|
- dist/slidge*
|
50
54
|
api_key:
|
51
55
|
from_secret: CODEBERG_TOKEN
|
56
|
+
note: CHANGELOG
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: slidge
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.6
|
4
4
|
Summary: XMPP bridging framework
|
5
5
|
Author-email: Nicolas Cedilnik <nicoco@nicoco.fr>
|
6
6
|
License: GNU AFFERO GENERAL PUBLIC LICENSE
|
@@ -669,22 +669,22 @@ Project-URL: Homepage, https://codeberg.org/slidge/
|
|
669
669
|
Project-URL: Issues, https://codeberg.org/slidge/slidge/issues
|
670
670
|
Project-URL: Repository, https://codeberg.org/slidge/slidge/
|
671
671
|
Project-URL: Chat room, https://conference.nicoco.fr:5281/muc_log/slidge/
|
672
|
-
Project-URL: Documentation, https://slidge.
|
672
|
+
Project-URL: Documentation, https://slidge.im/docs/slidge/main
|
673
|
+
Project-URL: changelog, https://codeberg.org/slidge/slidge/releases
|
673
674
|
Keywords: xmpp,gateway,bridge,instant messaging
|
674
675
|
Classifier: Topic :: Internet :: XMPP
|
675
676
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
676
677
|
Requires-Python: >=3.11
|
677
678
|
Description-Content-Type: text/markdown
|
678
|
-
Requires-Dist: aiohttp[speedups]
|
679
|
-
Requires-Dist: alembic
|
680
|
-
Requires-Dist: configargparse
|
679
|
+
Requires-Dist: aiohttp[speedups]<4,>=3.11.11
|
680
|
+
Requires-Dist: alembic<2,>=1.14.0
|
681
|
+
Requires-Dist: configargparse<2,>=1.7
|
681
682
|
Requires-Dist: defusedxml>=0.7.1
|
682
|
-
Requires-Dist:
|
683
|
-
Requires-Dist:
|
684
|
-
Requires-Dist:
|
685
|
-
Requires-Dist:
|
686
|
-
Requires-Dist:
|
687
|
-
Requires-Dist: sqlalchemy>=2.0.36
|
683
|
+
Requires-Dist: pillow<12,>=11.0.0
|
684
|
+
Requires-Dist: python-magic<0.5,>=0.4.27
|
685
|
+
Requires-Dist: qrcode<9,>=8.0
|
686
|
+
Requires-Dist: slixmpp<2,>=1.8.6
|
687
|
+
Requires-Dist: sqlalchemy<3,>=2
|
688
688
|
Requires-Dist: thumbhash>=0.1.2
|
689
689
|
|
690
690
|
![Slidge logo](https://codeberg.org/slidge/slidge/raw/branch/main/dev/assets/slidge-color-small.png)
|
@@ -693,14 +693,14 @@ Requires-Dist: thumbhash>=0.1.2
|
|
693
693
|
|
694
694
|
|
695
695
|
[![woodpecker CI status](https://ci.codeberg.org/api/badges/14027/status.svg)](https://ci.codeberg.org/repos/14027)
|
696
|
-
[![coverage](https://slidge.
|
696
|
+
[![coverage](https://slidge.im/coverage/main/coverage.svg)](https://slidge.im/coverage/main)
|
697
697
|
|
698
698
|
[![pypi version](https://badge.fury.io/py/slidge.svg)](https://pypi.org/project/slidge/)
|
699
699
|
[![debian unstable version](https://badges.debian.net/badges/debian/unstable/python3-slidge/version.svg)](https://packages.debian.org/unstable/python3-slidge)
|
700
700
|
|
701
701
|
Slidge is an XMPP (puppeteer) gateway library in python.
|
702
702
|
It makes
|
703
|
-
[writing gateways to other chat networks](https://slidge.im/
|
703
|
+
[writing gateways to other chat networks](https://slidge.im/docs/slidge/main/dev/tutorial.html)
|
704
704
|
(*legacy modules*) as frictionless as possible.
|
705
705
|
It supports fancy IM features, such as
|
706
706
|
[(emoji) reactions](https://xmpp.org/extensions/xep-0444.html),
|
@@ -751,7 +751,7 @@ class Session(BaseSession):
|
|
751
751
|
self.legacy_client.send_message(text=text, destination=chat.legacy_id)
|
752
752
|
```
|
753
753
|
|
754
|
-
There's more in [the tutorial](https://slidge.
|
754
|
+
There's more in [the tutorial](https://slidge.im/docs/slidge/main/dev/tutorial.html)!
|
755
755
|
|
756
756
|
Installation
|
757
757
|
------------
|
@@ -766,7 +766,7 @@ bundle.
|
|
766
766
|
Slidge is available on
|
767
767
|
[codeberg](https://codeberg.org/slidge/-/packages) (python packages and containers)
|
768
768
|
and [pypi](https://pypi.org/project/slidge/).
|
769
|
-
Refer to [the docs](https://slidge.
|
769
|
+
Refer to [the docs](https://slidge.im/docs/slidge/main/admin/install.html) for details.
|
770
770
|
|
771
771
|
About privacy
|
772
772
|
-------------
|
@@ -4,14 +4,14 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
[![woodpecker CI status](https://ci.codeberg.org/api/badges/14027/status.svg)](https://ci.codeberg.org/repos/14027)
|
7
|
-
[![coverage](https://slidge.
|
7
|
+
[![coverage](https://slidge.im/coverage/main/coverage.svg)](https://slidge.im/coverage/main)
|
8
8
|
|
9
9
|
[![pypi version](https://badge.fury.io/py/slidge.svg)](https://pypi.org/project/slidge/)
|
10
10
|
[![debian unstable version](https://badges.debian.net/badges/debian/unstable/python3-slidge/version.svg)](https://packages.debian.org/unstable/python3-slidge)
|
11
11
|
|
12
12
|
Slidge is an XMPP (puppeteer) gateway library in python.
|
13
13
|
It makes
|
14
|
-
[writing gateways to other chat networks](https://slidge.im/
|
14
|
+
[writing gateways to other chat networks](https://slidge.im/docs/slidge/main/dev/tutorial.html)
|
15
15
|
(*legacy modules*) as frictionless as possible.
|
16
16
|
It supports fancy IM features, such as
|
17
17
|
[(emoji) reactions](https://xmpp.org/extensions/xep-0444.html),
|
@@ -62,7 +62,7 @@ class Session(BaseSession):
|
|
62
62
|
self.legacy_client.send_message(text=text, destination=chat.legacy_id)
|
63
63
|
```
|
64
64
|
|
65
|
-
There's more in [the tutorial](https://slidge.
|
65
|
+
There's more in [the tutorial](https://slidge.im/docs/slidge/main/dev/tutorial.html)!
|
66
66
|
|
67
67
|
Installation
|
68
68
|
------------
|
@@ -77,7 +77,7 @@ bundle.
|
|
77
77
|
Slidge is available on
|
78
78
|
[codeberg](https://codeberg.org/slidge/-/packages) (python packages and containers)
|
79
79
|
and [pypi](https://pypi.org/project/slidge/).
|
80
|
-
Refer to [the docs](https://slidge.
|
80
|
+
Refer to [the docs](https://slidge.im/docs/slidge/main/admin/install.html) for details.
|
81
81
|
|
82
82
|
About privacy
|
83
83
|
-------------
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// This files defines the allowed "headers" for the commit messages.
|
2
|
+
// Following the rules makes the changelog generation easier.
|
3
|
+
// They come from angular conventions, unless commented.
|
4
|
+
const Configuration = {
|
5
|
+
extends: ['@commitlint/config-conventional'],
|
6
|
+
rules: {
|
7
|
+
'type-enum':
|
8
|
+
[
|
9
|
+
2,
|
10
|
+
'always',
|
11
|
+
[
|
12
|
+
'build',
|
13
|
+
'chore',
|
14
|
+
'ci',
|
15
|
+
'docs',
|
16
|
+
'feat',
|
17
|
+
'fix',
|
18
|
+
'perf',
|
19
|
+
'refactor',
|
20
|
+
'revert',
|
21
|
+
'style',
|
22
|
+
'test',
|
23
|
+
'compat', // workaround to play nice with non-compliant clients or servers; ideally reverted once fixed upstream
|
24
|
+
'cfix', // fixes an unreleased commit, should not appear in changelog
|
25
|
+
'imprv', // improvement of an existing feature
|
26
|
+
]
|
27
|
+
],
|
28
|
+
},
|
29
|
+
}
|
30
|
+
|
31
|
+
module.exports = Configuration
|
@@ -410,6 +410,12 @@
|
|
410
410
|
<xmpp:note>Will implement if useful for a plugin.</xmpp:note>
|
411
411
|
</xmpp:SupportedXep>
|
412
412
|
</implements>
|
413
|
+
<implements>
|
414
|
+
<xmpp:SupportedXep>
|
415
|
+
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0384.html"/>
|
416
|
+
<xmpp:status>complete</xmpp:status>
|
417
|
+
</xmpp:SupportedXep>
|
418
|
+
</implements>
|
413
419
|
<implements>
|
414
420
|
<xmpp:SupportedXep>
|
415
421
|
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0385.html"/>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.. note::
|
2
|
+
|
3
|
+
For legacy module-specific options, refer to their own docs:
|
4
|
+
`matridge <https://slidge.im/docs/matridge/main/config.html>`_,
|
5
|
+
`matteridge <https://slidge.im/docs/matteridge/main/config.html>`_,
|
6
|
+
`messlidger <https://slidge.im/docs/messlidger/main/config.html>`_,
|
7
|
+
`skidge <https://slidge.im/docs/skidge/main/config.html>`_,
|
8
|
+
`sleamdge <https://slidge.im/docs/sleamdge/main/config.html>`_,
|
9
|
+
`slidcord <https://slidge.im/docs/slidcord/main/config.html>`_,
|
10
|
+
`slidge-whatsapp <https://slidge.im/docs/slidge-whatsapp/main/config.html>`_,
|
11
|
+
`slidgnal <https://slidge.im/docs/slidgnal/main/config.html>`_,
|
12
|
+
`slidgram <https://slidge.im/docs/slidgram/main/config.html>`_.
|
@@ -40,7 +40,7 @@ Put this in a file called ``superduper.py``:
|
|
40
40
|
contact = await self.contacts.by_legacy_id(msg.sender)
|
41
41
|
contact.send_text(msg.text)
|
42
42
|
|
43
|
-
async def
|
43
|
+
async def on_text(self, chat: Recipient, text: str, *kwargs):
|
44
44
|
self.legacy.send_message(text=text, destination=chat.legacy_id)
|
45
45
|
|
46
46
|
|
@@ -123,7 +123,7 @@ From XMPP to legacy
|
|
123
123
|
|
124
124
|
.. code-block:: python
|
125
125
|
|
126
|
-
async def
|
126
|
+
async def on_text(self, chat: Recipient, text: str, **kwargs):
|
127
127
|
self.legacy.send_message(text=text, destination=chat.legacy_id)
|
128
128
|
|
129
129
|
When our user sends a message to ``something@superduper.example.org``,
|
@@ -0,0 +1,13 @@
|
|
1
|
+
.. note::
|
2
|
+
|
3
|
+
These are the generic user docs for slidge. For
|
4
|
+
:term:`Legacy Network`-specific docs, follow these links:
|
5
|
+
`matridge <https://slidge.im/docs/matridge/main/user.html>`_,
|
6
|
+
`matteridge <https://slidge.im/docs/matteridge/main/user.html>`_,
|
7
|
+
`messlidger <https://slidge.im/docs/messlidger/main/user.html>`_,
|
8
|
+
`skidge <https://slidge.im/docs/skidge/main/user.html>`_,
|
9
|
+
`sleamdge <https://slidge.im/docs/sleamdge/main/user.html>`_,
|
10
|
+
`slidcord <https://slidge.im/docs/slidcord/main/user.html>`_,
|
11
|
+
`slidge-whatsapp <https://slidge.im/docs/slidge-whatsapp/main/user.html>`_,
|
12
|
+
`slidgnal <https://slidge.im/docs/slidgnal/main/user.html>`_,
|
13
|
+
`slidgram <https://slidge.im/docs/slidgram/main/user.html>`_.
|
@@ -3,16 +3,15 @@ name = "slidge"
|
|
3
3
|
description = "XMPP bridging framework"
|
4
4
|
requires-python = ">= 3.11"
|
5
5
|
dependencies = [
|
6
|
-
"aiohttp[speedups]>=3.11.11",
|
7
|
-
"alembic>=1.14.0",
|
8
|
-
"configargparse>=1.7",
|
6
|
+
"aiohttp[speedups]>=3.11.11,<4",
|
7
|
+
"alembic>=1.14.0,<2",
|
8
|
+
"configargparse>=1.7,<2",
|
9
9
|
"defusedxml>=0.7.1",
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"sqlalchemy>=2.0.36",
|
10
|
+
"pillow>=11.0.0,<12",
|
11
|
+
"python-magic>=0.4.27,<0.5",
|
12
|
+
"qrcode>=8.0,<9",
|
13
|
+
"slixmpp>=1.8.6,<2",
|
14
|
+
"sqlalchemy>=2,<3",
|
16
15
|
"thumbhash>=0.1.2",
|
17
16
|
]
|
18
17
|
authors = [
|
@@ -24,7 +23,7 @@ classifiers = [
|
|
24
23
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
25
24
|
]
|
26
25
|
keywords = ["xmpp", "gateway", "bridge", "instant messaging"]
|
27
|
-
version = "v0.2.
|
26
|
+
version = "v0.2.6"
|
28
27
|
readme = "README.md"
|
29
28
|
|
30
29
|
[build-system]
|
@@ -42,7 +41,8 @@ Homepage = "https://codeberg.org/slidge/"
|
|
42
41
|
Issues = "https://codeberg.org/slidge/slidge/issues"
|
43
42
|
Repository = "https://codeberg.org/slidge/slidge/"
|
44
43
|
"Chat room" = "https://conference.nicoco.fr:5281/muc_log/slidge/"
|
45
|
-
Documentation = "https://slidge.
|
44
|
+
Documentation = "https://slidge.im/docs/slidge/main"
|
45
|
+
changelog = "https://codeberg.org/slidge/slidge/releases"
|
46
46
|
|
47
47
|
[dependency-groups]
|
48
48
|
dev = [
|
@@ -115,3 +115,54 @@ publish-url = "https://codeberg.org/api/packages/slidge/pypi"
|
|
115
115
|
# FIXME: remove this when the setuptools upstream bug is fixed
|
116
116
|
# https://github.com/astral-sh/uv/issues/9513#issuecomment-2519527822
|
117
117
|
license-files = []
|
118
|
+
|
119
|
+
|
120
|
+
[tool.git-cliff.remote.gitea]
|
121
|
+
owner = "slidge"
|
122
|
+
repo = "slidge"
|
123
|
+
|
124
|
+
[tool.git-cliff.changelog]
|
125
|
+
header = """
|
126
|
+
<!-- write something cool about the release here! -->
|
127
|
+
|
128
|
+
# Changes
|
129
|
+
"""
|
130
|
+
body = """
|
131
|
+
{% for group, commits in commits | group_by(attribute="group") %}
|
132
|
+
## {{ group | striptags | trim | upper_first }}
|
133
|
+
{% for commit in commits %}
|
134
|
+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
135
|
+
{% if commit.breaking %}[**breaking**] {% endif %}\
|
136
|
+
{{ commit.message | split(pat="\n") | first | upper_first | trim }}\
|
137
|
+
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif %} \
|
138
|
+
[`{{ commit.id | truncate(length=7, end="") }}`](./commit/{{ commit.id }})\
|
139
|
+
{% endfor %}
|
140
|
+
{% endfor %}\n
|
141
|
+
"""
|
142
|
+
footer = """
|
143
|
+
<!-- generated by git-cliff -->
|
144
|
+
"""
|
145
|
+
|
146
|
+
[tool.git-cliff.git]
|
147
|
+
conventional_commits = true
|
148
|
+
filter_unconventional = false
|
149
|
+
commit_parsers = [
|
150
|
+
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
151
|
+
{ message = "^imprv", group = "<!-- 1 -->✨ Improvements" },
|
152
|
+
{ message = "^fix", group = "<!-- 2 -->🐛 Bug Fixes" },
|
153
|
+
{ message = "^compat", group = "<!-- 3 -->💑 Compatibility" },
|
154
|
+
{ message = "^refactor", group = "<!-- 4 -->🚜 Refactor" },
|
155
|
+
{ message = "^doc", group = "<!-- 5 -->📚 Documentation" },
|
156
|
+
{ message = "^perf", group = "<!-- 6 -->⚡ Performance" },
|
157
|
+
{ message = "^style", group = "<!-- 7 -->🎨 Styling" },
|
158
|
+
{ message = "^test", group = "<!-- 8 -->🧪 Testing" },
|
159
|
+
{ message = "^chore\\(release\\): prepare for", skip = true },
|
160
|
+
{ message = "^chore\\(deps.*\\)", skip = true },
|
161
|
+
{ message = "^chore\\(pr\\)", skip = true },
|
162
|
+
{ message = "^chore\\(pull\\)", skip = true },
|
163
|
+
{ message = "^cfix", skip = true },
|
164
|
+
{ message = "^chore|^ci", group = "<!-- 9 -->⚙️ Miscellaneous Tasks" },
|
165
|
+
{ body = ".*security", group = "<!-- 10 -->🛡️ Security" },
|
166
|
+
{ message = "^revert", group = "<!-- 11 -->◀️ Revert" },
|
167
|
+
{ message = ".*", group = "<!-- 12 -->💼 Other" },
|
168
|
+
]
|
@@ -240,6 +240,14 @@ class AdhocProvider:
|
|
240
240
|
:param iq: the disco query IQ
|
241
241
|
:return: commands accessible to the given JID will be listed
|
242
242
|
"""
|
243
|
+
if not self.xmpp.jid_validator.match(str(jid)) and jid not in config.ADMINS:
|
244
|
+
raise XMPPError(
|
245
|
+
"forbidden",
|
246
|
+
"You are not authorized to execute adhoc commands on this gateway. "
|
247
|
+
"If this is unexpected, ask your administrator to verify that "
|
248
|
+
"'user-jid-validator' is correctly set in slidge's configuration.",
|
249
|
+
)
|
250
|
+
|
243
251
|
all_items = self.xmpp.plugin["xep_0030"].static.get_items(jid, node, None, None)
|
244
252
|
log.debug("Static items: %r", all_items)
|
245
253
|
if not all_items:
|
@@ -293,12 +293,16 @@ class FormField:
|
|
293
293
|
return value
|
294
294
|
|
295
295
|
def __validate_list_multi(self, value: list[str]) -> Union[list[str], list[JID]]:
|
296
|
+
# COMPAT: all the "if v" and "if not v" are workarounds for https://codeberg.org/slidge/slidge/issues/43
|
297
|
+
# They should be reverted once the bug is fixed upstream, cf https://soprani.ca/todo/390
|
296
298
|
for v in value:
|
297
299
|
if v not in self.__acceptable_options():
|
300
|
+
if not v:
|
301
|
+
continue
|
298
302
|
raise XMPPError("not-acceptable", f"Not a valid option: '{v}'")
|
299
303
|
if self.type == "list-multi":
|
300
|
-
return value
|
301
|
-
return [JID(v) for v in value]
|
304
|
+
return [v for v in value if v]
|
305
|
+
return [JID(v) for v in value if v]
|
302
306
|
|
303
307
|
def get_xml(self) -> SlixFormField:
|
304
308
|
"""
|
@@ -172,6 +172,9 @@ class Login(Command):
|
|
172
172
|
|
173
173
|
async def run(self, session: Optional[AnyBaseSession], _ifrom, *_):
|
174
174
|
assert session is not None
|
175
|
+
if session.is_logging_in:
|
176
|
+
raise XMPPError("bad-request", "You are already logging in.")
|
177
|
+
session.is_logging_in = True
|
175
178
|
try:
|
176
179
|
msg = await session.login()
|
177
180
|
except Exception as e:
|
@@ -179,6 +182,8 @@ class Login(Command):
|
|
179
182
|
raise XMPPError(
|
180
183
|
"internal-server-error", etype="wait", text=f"Could not login: {e}"
|
181
184
|
)
|
185
|
+
finally:
|
186
|
+
session.is_logging_in = False
|
182
187
|
session.logged = True
|
183
188
|
session.send_gateway_status(msg or "Re-connected", show="chat")
|
184
189
|
session.send_gateway_message(msg or "Re-connected")
|
@@ -448,13 +448,13 @@ class LegacyContact(
|
|
448
448
|
log.debug("Roster push request by plugin ignored (--no-roster-push)")
|
449
449
|
return
|
450
450
|
try:
|
451
|
-
await self.
|
451
|
+
await self.xmpp["xep_0356"].set_roster(
|
452
452
|
jid=self.user_jid, roster_items=self.get_roster_item()
|
453
453
|
)
|
454
454
|
except PermissionError:
|
455
455
|
warnings.warn(
|
456
456
|
"Slidge does not have privileges to add contacts to the roster. Refer"
|
457
|
-
" to https://slidge.
|
457
|
+
" to https://slidge.im/docs/slidge/main/admin/privilege.html for"
|
458
458
|
" more info."
|
459
459
|
)
|
460
460
|
if config.ROSTER_PUSH_PRESENCE_SUBSCRIPTION_REQUEST_FALLBACK:
|
@@ -490,12 +490,6 @@ class LegacyContact(
|
|
490
490
|
nick,
|
491
491
|
)
|
492
492
|
|
493
|
-
async def _set_roster(self, **kw):
|
494
|
-
try:
|
495
|
-
await self.xmpp["xep_0356"].set_roster(**kw)
|
496
|
-
except PermissionError:
|
497
|
-
await self.xmpp["xep_0356_old"].set_roster(**kw)
|
498
|
-
|
499
493
|
def send_friend_request(self, text: Optional[str] = None):
|
500
494
|
presence = self._make_presence(ptype="subscribe", pstatus=text, bare=True)
|
501
495
|
self._send(presence, nick=True)
|
@@ -68,7 +68,6 @@ USER_JID_VALIDATOR__DYNAMIC_DEFAULT = True
|
|
68
68
|
ADMINS: tuple[JIDType, ...] = ()
|
69
69
|
ADMINS__DOC = "JIDs of the gateway admins"
|
70
70
|
|
71
|
-
|
72
71
|
UPLOAD_SERVICE: Optional[str] = None
|
73
72
|
UPLOAD_SERVICE__DOC = (
|
74
73
|
"JID of an HTTP upload service the gateway can use. "
|
@@ -76,9 +75,6 @@ UPLOAD_SERVICE__DOC = (
|
|
76
75
|
"discovery."
|
77
76
|
)
|
78
77
|
|
79
|
-
SECRET_KEY: Optional[str] = None
|
80
|
-
SECRET_KEY__DOC = "Encryption for disk storage. Deprecated."
|
81
|
-
|
82
78
|
NO_ROSTER_PUSH = False
|
83
79
|
NO_ROSTER_PUSH__DOC = "Do not fill users' rosters with legacy contacts automatically"
|
84
80
|
|
@@ -187,7 +183,7 @@ MAM_MAX_DAYS__DOC = "Maximum number of days for group archive retention."
|
|
187
183
|
CORRECTION_EMPTY_BODY_AS_RETRACTION = True
|
188
184
|
CORRECTION_EMPTY_BODY_AS_RETRACTION__DOC = (
|
189
185
|
"Treat last message correction to empty message as a retraction. "
|
190
|
-
"(this is what cheogram
|
186
|
+
"(this is what cheogram does for retraction)"
|
191
187
|
)
|
192
188
|
|
193
189
|
ATTACHMENT_MAXIMUM_FILE_NAME_LENGTH = 200
|
@@ -220,3 +216,14 @@ STRIP_LEADING_EMOJI_ADHOC__DOC = (
|
|
220
216
|
"Strip the leading emoji in ad-hoc command names, if present, in case you "
|
221
217
|
"are a emoji-hater."
|
222
218
|
)
|
219
|
+
|
220
|
+
COMPONENT_NAME: Optional[str] = None
|
221
|
+
COMPONENT_NAME__DOC = (
|
222
|
+
"Overrides the default component name with a custom one. This is seen in service discovery and as the nickname "
|
223
|
+
"of the component in chat windows."
|
224
|
+
)
|
225
|
+
|
226
|
+
WELCOME_MESSAGE: Optional[str] = None
|
227
|
+
WELCOME_MESSAGE__DOC = (
|
228
|
+
"Overrides the default welcome message received by newly registered users."
|
229
|
+
)
|
@@ -254,6 +254,10 @@ class BaseGateway(
|
|
254
254
|
http: aiohttp.ClientSession
|
255
255
|
|
256
256
|
def __init__(self):
|
257
|
+
if config.COMPONENT_NAME:
|
258
|
+
self.COMPONENT_NAME = config.COMPONENT_NAME
|
259
|
+
if config.WELCOME_MESSAGE:
|
260
|
+
self.WELCOME_MESSAGE = config.WELCOME_MESSAGE
|
257
261
|
self.log = log
|
258
262
|
self.datetime_started = datetime.now()
|
259
263
|
self.xmpp = self # ugly hack to work with the BaseSender mixin :/
|
@@ -416,8 +420,14 @@ class BaseGateway(
|
|
416
420
|
await self.plugin["xep_0115"].update_caps(jid=self.boundjid)
|
417
421
|
|
418
422
|
if self.COMPONENT_AVATAR is not None:
|
419
|
-
|
420
|
-
|
423
|
+
try:
|
424
|
+
cached_avatar = await avatar_cache.convert_or_get(self.COMPONENT_AVATAR)
|
425
|
+
except Exception as e:
|
426
|
+
log.exception("Could not set the component avatar.", exc_info=e)
|
427
|
+
cached_avatar = None
|
428
|
+
else:
|
429
|
+
assert cached_avatar is not None
|
430
|
+
self.avatar_pk = cached_avatar.pk
|
421
431
|
else:
|
422
432
|
cached_avatar = None
|
423
433
|
|
@@ -505,6 +515,7 @@ class BaseGateway(
|
|
505
515
|
@timeit
|
506
516
|
async def login_wrap(self, session: "BaseSession"):
|
507
517
|
session.send_gateway_status("Logging in…", show="dnd")
|
518
|
+
session.is_logging_in = True
|
508
519
|
try:
|
509
520
|
status = await session.login()
|
510
521
|
except Exception as e:
|
@@ -798,7 +809,9 @@ class BaseGateway(
|
|
798
809
|
|
799
810
|
async def unregister_user(self, user: GatewayUser):
|
800
811
|
self.send_presence(
|
801
|
-
pshow="
|
812
|
+
pshow="dnd",
|
813
|
+
pstatus="You unregistered from this gateway.",
|
814
|
+
pto=user.jid,
|
802
815
|
)
|
803
816
|
await self.xmpp.plugin["xep_0077"].api["user_remove"](None, None, user.jid)
|
804
817
|
await self.xmpp.session_cls.kill_by_jid(user.jid)
|
@@ -903,7 +916,6 @@ SLIXMPP_PLUGINS = [
|
|
903
916
|
"xep_0333", # Chat markers
|
904
917
|
"xep_0334", # Message Processing Hints
|
905
918
|
"xep_0356", # Privileged Entity
|
906
|
-
"xep_0356_old", # Privileged Entity (old namespace)
|
907
919
|
"xep_0363", # HTTP file upload
|
908
920
|
"xep_0385", # Stateless in-line media sharing
|
909
921
|
"xep_0402", # PEP Native Bookmarks
|
@@ -177,15 +177,12 @@ class CarbonMessageMixin(ContentMessageMixin, MarkerMixin):
|
|
177
177
|
try:
|
178
178
|
self.xmpp["xep_0356"].send_privileged_message(msg)
|
179
179
|
except PermissionError:
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
" https://slidge.codeberg.page/docs/main/admin/privilege.html"
|
187
|
-
" for more info."
|
188
|
-
)
|
180
|
+
warnings.warn(
|
181
|
+
"Slidge does not have privileges to send message on behalf of"
|
182
|
+
" user.Refer to"
|
183
|
+
" https://slidge.im/docs/slidge/main/admin/privilege.html"
|
184
|
+
" for more info."
|
185
|
+
)
|
189
186
|
|
190
187
|
|
191
188
|
class InviteMixin(MessageMaker):
|
@@ -207,7 +207,8 @@ class PubSubComponent(NamedLockMixin, BasePlugin):
|
|
207
207
|
) -> PepAvatar:
|
208
208
|
if stanza.get_to() == self.xmpp.boundjid.bare:
|
209
209
|
item = PepAvatar()
|
210
|
-
|
210
|
+
if hasattr(self.xmpp, "avatar_pk"):
|
211
|
+
item.set_avatar_from_cache(avatar_cache.get_by_pk(self.xmpp.avatar_pk))
|
211
212
|
return item
|
212
213
|
|
213
214
|
if contact is None:
|
@@ -33,7 +33,7 @@ from ..util.types import (
|
|
33
33
|
ResourceDict,
|
34
34
|
Sticker,
|
35
35
|
)
|
36
|
-
from ..util.util import deprecated
|
36
|
+
from ..util.util import deprecated, noop_coro
|
37
37
|
|
38
38
|
if TYPE_CHECKING:
|
39
39
|
from ..group.participant import LegacyParticipant
|
@@ -98,6 +98,7 @@ class BaseSession(
|
|
98
98
|
self.ignore_messages = set[str]()
|
99
99
|
|
100
100
|
self.contacts: LegacyRoster = LegacyRoster.get_self_or_unique_subclass()(self)
|
101
|
+
self.is_logging_in = False
|
101
102
|
self._logged = False
|
102
103
|
self.__reset_ready()
|
103
104
|
|
@@ -527,11 +528,13 @@ class BaseSession(
|
|
527
528
|
|
528
529
|
@logged.setter
|
529
530
|
def logged(self, v: bool):
|
531
|
+
self.is_logging_in = False
|
530
532
|
self._logged = v
|
531
533
|
if self.ready.done():
|
532
534
|
if v:
|
533
535
|
return
|
534
536
|
self.__reset_ready()
|
537
|
+
self.shutdown(logout=False)
|
535
538
|
else:
|
536
539
|
if v:
|
537
540
|
self.ready.set_result(True)
|
@@ -539,12 +542,15 @@ class BaseSession(
|
|
539
542
|
def __repr__(self):
|
540
543
|
return f"<Session of {self.user_jid}>"
|
541
544
|
|
542
|
-
def shutdown(self) -> asyncio.Task:
|
545
|
+
def shutdown(self, logout=True) -> asyncio.Task:
|
543
546
|
for c in self.contacts:
|
544
547
|
c.offline()
|
545
548
|
for m in self.bookmarks:
|
546
549
|
m.shutdown()
|
547
|
-
|
550
|
+
if logout:
|
551
|
+
return self.xmpp.loop.create_task(self.logout())
|
552
|
+
else:
|
553
|
+
return self.xmpp.loop.create_task(noop_coro())
|
548
554
|
|
549
555
|
@staticmethod
|
550
556
|
def legacy_to_xmpp_msg_id(legacy_msg_id: LegacyMessageType) -> str:
|
@@ -657,6 +663,8 @@ class BaseSession(
|
|
657
663
|
return
|
658
664
|
for c in session.contacts:
|
659
665
|
c.unsubscribe()
|
666
|
+
for m in session.bookmarks:
|
667
|
+
m.shutdown()
|
660
668
|
user = cls.xmpp.store.users.get(jid)
|
661
669
|
if user is None:
|
662
670
|
log.warning("User not found during unregistration")
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"""Add Participant.nickname_no_illegal
|
2
|
+
|
3
|
+
Revision ID: 04cf35e3cf85
|
4
|
+
Revises: 15b0bd83407a
|
5
|
+
Create Date: 2025-02-22 06:57:45.491326
|
6
|
+
|
7
|
+
"""
|
8
|
+
|
9
|
+
from typing import Sequence, Union
|
10
|
+
|
11
|
+
import sqlalchemy as sa
|
12
|
+
from alembic import op
|
13
|
+
|
14
|
+
# revision identifiers, used by Alembic.
|
15
|
+
revision: str = "04cf35e3cf85"
|
16
|
+
down_revision: Union[str, None] = "15b0bd83407a"
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
18
|
+
depends_on: Union[str, Sequence[str], None] = None
|
19
|
+
|
20
|
+
|
21
|
+
def upgrade() -> None:
|
22
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
23
|
+
with op.batch_alter_table("participant", schema=None) as batch_op:
|
24
|
+
batch_op.add_column(
|
25
|
+
sa.Column("nickname_no_illegal", sa.String(), nullable=True)
|
26
|
+
)
|
27
|
+
|
28
|
+
# ### end Alembic commands ###
|
29
|
+
|
30
|
+
|
31
|
+
def downgrade() -> None:
|
32
|
+
with op.batch_alter_table("participant", schema=None) as batch_op:
|
33
|
+
batch_op.drop_column("nickname_no_illegal")
|