Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes sending pubsub events for empty item. #59

Closed
wants to merge 1 commit into from

Conversation

damencho
Copy link
Contributor

@damencho damencho commented Dec 6, 2015

XEP-0060 allows no elements on second level of nodes.

damencho referenced this pull request in jitsi/smack_3_2_2 Dec 6, 2015
@Flowdalic
Copy link
Member

Could you provide a pointer to the related section of xep60? I assume it's not an issue that we skip the getElementName().equals(secondElement) check if secondLevelList.isEmpty()? (BTW, why use size() == 0 and not isEmpty()?)

@damencho
Copy link
Contributor Author

damencho commented Dec 6, 2015

No reason for the size(), you are right.
This is for example in case of: new EventContentFilter(EventElementType.items.toString(), "item")
Where items can have no item children, as said in XEP-0060:

<xs:element name='items'>
    <xs:complexType>
      <xs:choice>
        <xs:element ref='item' minOccurs='0' maxOccurs='unbounded'/>
        <xs:element ref='retract' minOccurs='0' maxOccurs='unbounded'/>
      </xs:choice>
      <xs:attribute name='node' type='xs:string' use='required'/>
    </xs:complexType>
  </xs:element>

@Flowdalic
Copy link
Member

Cherry picked, added more strictness and committed as 46f0110

@Flowdalic Flowdalic closed this Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants