fixed a typo in method name getExtensionsXML, made Presence's toXML method refer to that method in building it's XML.. PENDING - this needs to be done for the other packets as well...

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1949 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
loki 2003-05-27 15:07:13 +00:00
parent ddaf5d9bfd
commit 92d8dc21fc
3 changed files with 6 additions and 2 deletions

View File

@ -227,7 +227,7 @@ public class Message extends Packet {
} }
} }
// Add packet extensions, if any are defined. // Add packet extensions, if any are defined.
buf.append(getExtentionsXML()); buf.append(getExtensionsXML());
buf.append("</message>"); buf.append("</message>");
return buf.toString(); return buf.toString();
} }

View File

@ -369,7 +369,7 @@ public abstract class Packet {
* @return the extension sub-packets as XML or the Empty String if there * @return the extension sub-packets as XML or the Empty String if there
* are no packet extensions. * are no packet extensions.
*/ */
protected synchronized String getExtentionsXML() { protected synchronized String getExtensionsXML() {
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
// Add in all standard extension sub-packets. // Add in all standard extension sub-packets.
Iterator extensions = getExtensions(); Iterator extensions = getExtensions();

View File

@ -217,7 +217,11 @@ public class Presence extends Packet {
if (mode != null && mode != Mode.AVAILABLE) { if (mode != null && mode != Mode.AVAILABLE) {
buf.append("<show>").append(mode).append("</show>"); buf.append("<show>").append(mode).append("</show>");
} }
buf.append(this.getExtensionsXML());
buf.append("</presence>"); buf.append("</presence>");
return buf.toString(); return buf.toString();
} }