AnsweredAssumed Answered

Presence.toXml() does not write type attribute

Question asked by Centerback on Nov 2, 2016
Latest reply on Nov 4, 2016 by Centerback

Hi,

Does type attribute in Presence class is an optional field?

In the source code, it does not write to xml when type is available. (in red color)

 

   @Override
   public XmlStringBuilder toXML() {
   XmlStringBuilder buf = new XmlStringBuilder();
  buf.halfOpenElement(ELEMENT);
  addCommonAttributes(buf);
   if (type != Type.available) {
  buf.attribute("type", type);
  }
  buf.rightAngleBracket();

 

 

I am new to smack, any help is really appreciated.

Thanks!

Outcomes