slidge 0.1.2__tar.gz → 0.1.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {slidge-0.1.2 → slidge-0.1.3}/PKG-INFO +1 -1
- {slidge-0.1.2 → slidge-0.1.3}/pyproject.toml +1 -1
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/session_dispatcher.py +9 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/group/participant.py +4 -4
- {slidge-0.1.2 → slidge-0.1.3}/LICENSE +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/README.md +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/__main__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/adhoc.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/admin.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/base.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/categories.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/chat_command.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/register.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/command/user.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/contact/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/contact/contact.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/contact/roster.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/cache.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/config.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/base.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/caps.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/delivery_receipt.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/disco.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/mam.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/muc_admin.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/ping.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/presence.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/registration.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/search.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/gateway/vcard_temp.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/attachment.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/avatar.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/base.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/disco.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/lock.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/message.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/message_maker.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/presence.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/mixins/recipient.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/pubsub.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/core/session.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/group/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/group/archive.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/group/bookmarks.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/group/room.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/migration.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/py.typed +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/link_preview/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/link_preview/link_preview.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/link_preview/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/roster.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0077/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0077/register.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0077/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0100/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0100/gateway.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0100/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0153/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0153/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0153/vcard_avatar.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0264/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0264/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0264/thumbnail.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0292/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0292/vcard4.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0313/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0313/mam.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0313/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0317/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0317/hats.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0317/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0356_old/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0356_old/privilege.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0356_old/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0424/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0424/retraction.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0424/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0490/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0490/mds.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/slixfix/xep_0490/stanza.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/__init__.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/archive_msg.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/conf.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/db.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/schema.sql +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/sql.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/test.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/types.py +0 -0
- {slidge-0.1.2 → slidge-0.1.3}/slidge/util/util.py +0 -0
@@ -448,6 +448,15 @@ class SessionDispatcher:
|
|
448
448
|
entity.react(legacy_id, emojis, xmpp_id=xmpp_id, carbon=True)
|
449
449
|
|
450
450
|
async def on_presence(self, p: Presence):
|
451
|
+
if p.get_plugin("muc_join", check=True):
|
452
|
+
# handled in on_groupchat_join
|
453
|
+
# without this early return, since we switch from and to in this
|
454
|
+
# presence stanza, on_groupchat_join ends up trying to instantiate
|
455
|
+
# a MUC with the user's JID, which in turn leads to slidge sending
|
456
|
+
# a (error) presence from=the user's JID, which terminates the
|
457
|
+
# XML stream.
|
458
|
+
return
|
459
|
+
|
451
460
|
session = await self.__get_session(p)
|
452
461
|
|
453
462
|
pto = p.get_to()
|
@@ -143,6 +143,7 @@ class LegacyParticipant(
|
|
143
143
|
|
144
144
|
if self.is_system:
|
145
145
|
self.jid = j
|
146
|
+
self._nickname_no_illegal = ""
|
146
147
|
return
|
147
148
|
|
148
149
|
nickname = unescaped_nickname
|
@@ -213,7 +214,6 @@ class LegacyParticipant(
|
|
213
214
|
|
214
215
|
kwargs["status_codes"] = set()
|
215
216
|
p = self._make_presence(ptype="available", last_seen=last_seen, **kwargs)
|
216
|
-
self.__add_nick_element(p)
|
217
217
|
self._send(p)
|
218
218
|
|
219
219
|
if old:
|
@@ -301,6 +301,7 @@ class LegacyParticipant(
|
|
301
301
|
**send_kwargs,
|
302
302
|
) -> MessageOrPresenceTypeVar:
|
303
303
|
stanza["occupant-id"]["id"] = self.__occupant_id
|
304
|
+
self.__add_nick_element(stanza)
|
304
305
|
if isinstance(stanza, Presence):
|
305
306
|
if stanza["type"] == "unavailable" and not self.__presence_sent:
|
306
307
|
return stanza # type:ignore
|
@@ -344,11 +345,11 @@ class LegacyParticipant(
|
|
344
345
|
)
|
345
346
|
return item
|
346
347
|
|
347
|
-
def __add_nick_element(self,
|
348
|
+
def __add_nick_element(self, stanza: Union[Presence, Message]):
|
348
349
|
if (nick := self._nickname_no_illegal) != self.jid.resource:
|
349
350
|
n = self.xmpp.plugin["xep_0172"].stanza.UserNick()
|
350
351
|
n["nick"] = nick
|
351
|
-
|
352
|
+
stanza.append(n)
|
352
353
|
|
353
354
|
def _get_last_presence(self) -> Optional[CachedPresence]:
|
354
355
|
own = super()._get_last_presence()
|
@@ -400,7 +401,6 @@ class LegacyParticipant(
|
|
400
401
|
)
|
401
402
|
if presence_id:
|
402
403
|
p["id"] = presence_id
|
403
|
-
self.__add_nick_element(p)
|
404
404
|
self._send(p, full_jid)
|
405
405
|
|
406
406
|
def leave(self):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|