Merge pull request #1618 from famedly/krille/add-raw-command

feat: Add sendRaw command
This commit is contained in:
Krille-chan 2023-11-22 15:50:02 +01:00 committed by GitHub
commit 9019dfd566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

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