Skip to content

Commit

Permalink
[muc] MUC Item actor's nick to XML
Browse files Browse the repository at this point in the history
If an actor's nick is set in `MUCItem` this value should be added to the XMPP representation of the instance.

Fixes SMACK-945
  • Loading branch information
guusdk committed Jul 8, 2024
1 parent d27fef0 commit 7c27a70
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,11 @@ public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclo
xml.optAttribute("role", getRole());
xml.rightAngleBracket();
xml.optElement("reason", getReason());
if (getActor() != null) {
xml.halfOpenElement("actor").attribute("jid", getActor()).closeEmptyElement();
if (getActor() != null || getActorNick() != null) {
xml.halfOpenElement("actor");
xml.optAttribute("jid", getActor());
xml.optAttribute("nick", getActorNick());
xml.closeEmptyElement();
}
xml.closeElement(Stanza.ITEM);
return xml;
Expand Down

0 comments on commit 7c27a70

Please sign in to comment.