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

Merge pull request #607 from guusdk/SMACK-945_Actor-nick-in-XML

SMACK-945: MUC Item actor's nick to XML
This commit is contained in:
Florian Schmaus 2024-07-09 06:19:55 +00:00 committed by GitHub
commit 9a87643429
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;