mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22: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",
|
"http://jabber.org/protocol/muc#rooms",
|
||||||
new NodeInformationProvider() {
|
new NodeInformationProvider() {
|
||||||
public List<DiscoverItems.Item> getNodeItems() {
|
public List<DiscoverItems.Item> getNodeItems() {
|
||||||
|
MultiUserChatManager mucManager = MultiUserChatManager.getInstanceFor(connection);
|
||||||
List<DiscoverItems.Item> answer = new ArrayList<>();
|
List<DiscoverItems.Item> answer = new ArrayList<>();
|
||||||
Iterator rooms = MultiUserChat.getJoinedRooms(connection);
|
Iterator<Jid> rooms = mucManager.getJoinedRooms().iterator();
|
||||||
while (rooms.hasNext()) {
|
while (rooms.hasNext()) {
|
||||||
answer.add(new DiscoverItems.Item((String)rooms.next()));
|
answer.add(new DiscoverItems.Item(rooms.next()));
|
||||||
}
|
}
|
||||||
return answer;
|
return answer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue