feat: Add sendRaw command

This commit is contained in:
Krille 2023-11-21 08:22:34 +01:00
parent c6e8b16647
commit 82b885dee0
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -17,6 +17,7 @@
*/
import 'dart:async';
import 'dart:convert';
import 'package:matrix/matrix.dart';
@ -276,6 +277,14 @@ extension CommandsClientExtension on Client {
txid: args.txid,
);
});
addCommand('sendRaw', (args) async {
await args.room.sendEvent(
jsonDecode(args.msg),
inReplyTo: args.inReplyTo,
txid: args.txid,
);
return null;
});
}
}