diff --git a/examples_dart/bin/muc_client.dart b/examples_dart/bin/muc_client.dart index 4e88c84..1eeb11e 100644 --- a/examples_dart/bin/muc_client.dart +++ b/examples_dart/bin/muc_client.dart @@ -75,11 +75,16 @@ void main(List args) async { }); // Join room - await connection.getManagerById(mucManager)!.joinRoom( - muc, - nick, - maxHistoryStanzas: 0, - ); + final mm = connection.getManagerById(mucManager)!; + await mm.joinRoom( + muc, + nick, + maxHistoryStanzas: 0, + ); + final state = (await mm.getRoomState(muc))!; + + print('=====> ${state.members.length} users in room'); + print('=====> ${state.members.values.map((m) => m.nick).join(", ")}'); final repl = Repl(prompt: '> '); await for (final line in repl.runAsync()) { diff --git a/packages/moxxmpp/lib/src/xeps/xep_0045/types.dart b/packages/moxxmpp/lib/src/xeps/xep_0045/types.dart index a58866c..06bb806 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0045/types.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0045/types.dart @@ -5,6 +5,7 @@ import 'package:moxxmpp/src/xeps/xep_0004.dart'; import 'package:moxxmpp/src/xeps/xep_0030/types.dart'; class InvalidAffiliationException implements Exception {} + class InvalidRoleException implements Exception {} enum Affiliation {