mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Update disco.md
This commit is contained in:
parent
32f8c345fb
commit
9bd88e0df5
1 changed files with 3 additions and 2 deletions
|
@ -93,10 +93,11 @@ ServiceDiscoveryManager.getInstanceFor(connection).setNodeInformationProvider(
|
|||
"http://jabber.org/protocol/muc#rooms",
|
||||
new NodeInformationProvider() {
|
||||
public List<DiscoverItems.Item> getNodeItems() {
|
||||
MultiUserChatManager mucManager = MultiUserChatManager.getInstanceFor(connection);
|
||||
List<DiscoverItems.Item> answer = new ArrayList<>();
|
||||
Iterator rooms = MultiUserChat.getJoinedRooms(connection);
|
||||
Iterator<Jid> rooms = mucManager.getJoinedRooms().iterator();
|
||||
while (rooms.hasNext()) {
|
||||
answer.add(new DiscoverItems.Item((String)rooms.next()));
|
||||
answer.add(new DiscoverItems.Item(rooms.next()));
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue