From 9ecd487327bc880f40d7dde488663bc4d2a138d6 Mon Sep 17 00:00:00 2001 From: Karthikeyan S Date: Wed, 5 Feb 2025 18:58:21 +0530 Subject: [PATCH] chore: release v0.38.0 --- CHANGELOG.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c734372..2e5a3e60d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,56 @@ +## 0.38.0 + +### Migration notes + +Now you can pass a `StringBuffer` object to the command handler to pass some arbitrary data back to the caller. + +**Before:** +``` +addCommand('newCommand', (CommandArgs args){}); +``` + +**After:** +``` +addCommand('newCommand', (CommandArgs args, StringBuffer? stdout){}); +``` + +In order to use the stdout, you should create a `StringBuffer` stdout object and +pass it to the `parseAndRunCommand` method or `sendTextEvent` (that uses `parseAndRunCommand` internally). + +Like this: +``` +final stdout = StringBuffer(); + +await client.parseAndRunCommand( + null, // Room can be null now, if the command isn't room specific + "/newCommand options", + ... + stdout: stdout, +); + +// OR + +await room.sendTextEvent( + "/newCommand options" + ... + commandStdout: stdout, +); + +final output = DefaultCommandOutput.fromStdout(stdout); +if(output != null) { + print(output.toString()); +} +``` + +### All changes: +- feat: (BREAKING) Make share keys with logic configurable (Krille) +- feat: BREAKING improve command_extension (The one with the braid) +- fix: Megolm sessions become invalid after restarting client (Krille) +- fix: priorize direct chat users over empty hero user list (The one with the braid) +- fix: PushNotification fromJson - toJson fails (Krille) +- refactor: Make converting linebreaks in markdowntohtml optional (Krille) +- refactor: Use .toSet() instead of Set.from() (Krille) + ## 0.37.0 Bigger release with a lot of refactorings under the hood. Those do not necessarily make the SDK more performant but more robust and type safe. diff --git a/pubspec.yaml b/pubspec.yaml index 465a282cd..5bc23171b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.37.0 +version: 0.38.0 homepage: https://famedly.com repository: https://github.com/famedly/matrix-dart-sdk.git issue_tracker: https://github.com/famedly/matrix-dart-sdk/issues