Skip to content

Commit

Permalink
feat: Add sendRaw command
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Nov 22, 2023
1 parent c6e8b16 commit 82b885d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/src/utils/commands_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import 'dart:async';
import 'dart:convert';

import 'package:matrix/matrix.dart';

Expand Down Expand Up @@ -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;
});
}
}

Expand Down

0 comments on commit 82b885d

Please sign in to comment.