Skip to content

Commit

Permalink
Merge pull request #1618 from famedly/krille/add-raw-command
Browse files Browse the repository at this point in the history
feat: Add sendRaw command
  • Loading branch information
krille-chan authored Nov 22, 2023
2 parents c6e8b16 + 82b885d commit 9019dfd
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 9019dfd

Please sign in to comment.