1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-18 17:01:08 +01:00

Change Element.toXml() to toXml(String enclosingNamespace)

This commit is contained in:
Florian Schmaus 2018-04-25 14:20:18 +02:00
parent 380f9a2b72
commit 5ab2903c32
229 changed files with 634 additions and 536 deletions

View file

@ -211,19 +211,19 @@ public class MultipleRecipientManager {
if (to != null) {
for (Jid jid : to) {
packet.setTo(jid);
connection.sendStanza(new PacketCopy(packet.toXML()));
connection.sendStanza(new PacketCopy(packet.toXML(null)));
}
}
if (cc != null) {
for (Jid jid : cc) {
packet.setTo(jid);
connection.sendStanza(new PacketCopy(packet.toXML()));
connection.sendStanza(new PacketCopy(packet.toXML(null)));
}
}
if (bcc != null) {
for (Jid jid : bcc) {
packet.setTo(jid);
connection.sendStanza(new PacketCopy(packet.toXML()));
connection.sendStanza(new PacketCopy(packet.toXML(null)));
}
}
}
@ -309,13 +309,13 @@ public class MultipleRecipientManager {
}
@Override
public CharSequence toXML() {
public CharSequence toXML(String enclosingNamespace) {
return text;
}
@Override
public String toString() {
return toXML().toString();
return toXML(null).toString();
}
}

View file

@ -118,12 +118,12 @@ public class MultipleAddresses implements ExtensionElement {
}
@Override
public XmlStringBuilder toXML() {
public XmlStringBuilder toXML(String enclosingNamespace) {
XmlStringBuilder buf = new XmlStringBuilder(this);
buf.rightAngleBracket();
// Loop through all the addresses and append them to the string buffer
for (Address address : addresses) {
buf.append(address.toXML());
buf.append(address.toXML(null));
}
buf.closeElement(this);
return buf;
@ -194,7 +194,7 @@ public class MultipleAddresses implements ExtensionElement {
}
@Override
public XmlStringBuilder toXML() {
public XmlStringBuilder toXML(String enclosingNamespace) {
XmlStringBuilder buf = new XmlStringBuilder();
buf.halfOpenElement(this).attribute("type", type);
buf.optAttribute("jid", jid);