sendGroupMessage method
Implementation
@override
Future<String?> sendGroupMessage(
String topic,
dynamic message,
String authorityId,
String typeId,
int versionMajor,
) async {
try {
final params = <String, dynamic>{
'topic': topic,
'message': message,
'authorityId': authorityId,
'typeId': typeId,
'versionMajor': versionMajor,
}.jsify() as JSObject;
final result = await _promiseToFuture(
_clientManager.sendGroupMessage(params),
);
return (result as JSString?)?.toDart;
} catch (e) {
throw Exception('Failed to send group message: $e');
}
}