fix(xmpp): show message for empty disco#items results (XEP-0030) #89
1 Participants
Notifications
Due Date
No due date set.
Blocks
Reference: devs/cproof#89
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/xep-0030-empty-disco-items"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes XEP-0030 compliance issue where empty disco#items results were silently ignored instead of showing a user-friendly message.
Problem
When a server returns an empty
<query/>element for disco#items (which is valid per XEP-0030), the client silently returned without displaying any message to the user.Per XEP-0030 Section 3.1:
Solution
Removed erroneous early return in
_disco_items_result_handler()whenchild == NULL. Now the function continues to display "No service discovery items for X" as intended.Changes
Root Cause
This update introduced in commit
f28655c5c(2016-05-08) "Move logic to connection_set_disco_items" which added the early return check.Testing
disco_items_empty_result(in PR #88)/disco itemsagainst server with no itemsRelated