send method
Implementation
Future<Either<BaseException, void>> send({
required String chatId,
required String localId,
required String scope,
String? message,
String? fileId,
}) async {
try {
final args = [
chatId,
{
"scope": scope,
"localId": localId,
"message": ?message,
"fileId": ?fileId,
},
];
SeedKitLoggerService.i('Hub Send: method=$sendMessageKey, args=$args');
await _controller?.invoke(
sendMessageKey,
args: args,
);
SeedKitLoggerService.i('Hub Sended: $args');
return const Right(null);
} catch (e, s) {
SeedKitLoggerService.i('Hub Send error: $e');
return ErrorHandler.fromError(e, stackTrace: s);
}
}