Skip to content

Commit

Permalink
Merge pull request #1937 from TheOneWithTheBraid/braid/command-runner
Browse files Browse the repository at this point in the history
feat: improve commands_extension
  • Loading branch information
coder-with-a-bushido authored Feb 4, 2025
2 parents 51b1005 + 86fa1f9 commit 24a0cfb
Show file tree
Hide file tree
Showing 4 changed files with 360 additions and 92 deletions.
2 changes: 1 addition & 1 deletion lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Client extends MatrixApi {
DateTime? _accessTokenExpiresAt;

// For CommandsClientExtension
final Map<String, FutureOr<String?> Function(CommandArgs)> commands = {};
final Map<String, CommandExecutionCallback> commands = {};
final Filter syncFilter;

final NativeImplementations nativeImplementations;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ class Room {
String msgtype = MessageTypes.Text,
String? threadRootEventId,
String? threadLastEventId,
StringBuffer? commandStdout,
}) {
if (parseCommands) {
return client.parseAndRunCommand(
Expand All @@ -635,6 +636,7 @@ class Room {
txid: txid,
threadRootEventId: threadRootEventId,
threadLastEventId: threadLastEventId,
stdout: commandStdout,
);
}
final event = <String, dynamic>{
Expand Down
Loading

0 comments on commit 24a0cfb

Please sign in to comment.