Skip to content

Commit 9ecd487

Browse files
chore: release v0.38.0
1 parent a3d33ee commit 9ecd487

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

CHANGELOG.md

+53
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
## 0.38.0
2+
3+
### Migration notes
4+
5+
Now you can pass a `StringBuffer` object to the command handler to pass some arbitrary data back to the caller.
6+
7+
**Before:**
8+
```
9+
addCommand('newCommand', (CommandArgs args){});
10+
```
11+
12+
**After:**
13+
```
14+
addCommand('newCommand', (CommandArgs args, StringBuffer? stdout){});
15+
```
16+
17+
In order to use the stdout, you should create a `StringBuffer` stdout object and
18+
pass it to the `parseAndRunCommand` method or `sendTextEvent` (that uses `parseAndRunCommand` internally).
19+
20+
Like this:
21+
```
22+
final stdout = StringBuffer();
23+
24+
await client.parseAndRunCommand(
25+
null, // Room can be null now, if the command isn't room specific
26+
"/newCommand options",
27+
...
28+
stdout: stdout,
29+
);
30+
31+
// OR
32+
33+
await room.sendTextEvent(
34+
"/newCommand options"
35+
...
36+
commandStdout: stdout,
37+
);
38+
39+
final output = DefaultCommandOutput.fromStdout(stdout);
40+
if(output != null) {
41+
print(output.toString());
42+
}
43+
```
44+
45+
### All changes:
46+
- feat: (BREAKING) Make share keys with logic configurable (Krille)
47+
- feat: BREAKING improve command_extension (The one with the braid)
48+
- fix: Megolm sessions become invalid after restarting client (Krille)
49+
- fix: priorize direct chat users over empty hero user list (The one with the braid)
50+
- fix: PushNotification fromJson - toJson fails (Krille)
51+
- refactor: Make converting linebreaks in markdowntohtml optional (Krille)
52+
- refactor: Use .toSet() instead of Set.from() (Krille)
53+
154
## 0.37.0
255

356
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.

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: matrix
22
description: Matrix Dart SDK
3-
version: 0.37.0
3+
version: 0.38.0
44
homepage: https://famedly.com
55
repository: https://github.com/famedly/matrix-dart-sdk.git
66
issue_tracker: https://github.com/famedly/matrix-dart-sdk/issues

0 commit comments

Comments
 (0)