1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

[muc] MUC Item actor's nick to XML

If an actor's nick is set in `MUCItem` this value should be added to the XMPP representation of the instance.

Fixes SMACK-945
This commit is contained in:
Guus der Kinderen 2024-07-05 15:14:43 +02:00
parent d27fef0bae
commit 7c27a707c8

View file

@ -169,8 +169,11 @@ public class MUCItem implements NamedElement {
xml.optAttribute("role", getRole()); xml.optAttribute("role", getRole());
xml.rightAngleBracket(); xml.rightAngleBracket();
xml.optElement("reason", getReason()); xml.optElement("reason", getReason());
if (getActor() != null) { if (getActor() != null || getActorNick() != null) {
xml.halfOpenElement("actor").attribute("jid", getActor()).closeEmptyElement(); xml.halfOpenElement("actor");
xml.optAttribute("jid", getActor());
xml.optAttribute("nick", getActorNick());
xml.closeEmptyElement();
} }
xml.closeElement(Stanza.ITEM); xml.closeElement(Stanza.ITEM);
return xml; return xml;