Message.reply(): do not use bare jid if component

Components are likely to be MUC services more than
muc participants, and reply() is used when XMPPError
is raised, where it makes no sense to strip the resource
This commit is contained in:
nicoco 2023-02-23 20:28:31 +01:00 committed by Nicolas Cedilnik
parent abd3f40e96
commit 78b42bdbbe

View file

@ -176,7 +176,7 @@ class Message(RootStanza):
"""
new_message = StanzaBase.reply(self, clear)
if self['type'] == 'groupchat':
if not getattr(self.stream, "is_component", False) and self['type'] == 'groupchat':
new_message['to'] = new_message['to'].bare
new_message['thread'] = self['thread']