Feature request: Add CLI argument to support redacted event elision in `--tail` calls.
- Lingua principale
- Rust
- Stelle
- 236
- Fork
- 25
- Merge medio
- 4h 30m
- PR unite (30g)
- 2
Descrizione
This is a continuation of issue #228. We would like to have a CLI argument `--skip-redacted` that when combined with `--tail` skips all of the redacted events in the message stream.
---
The current behavior is:
```text
kevin@kevin-hp-840g10:~/matrix-commander-rs$ cargo run -- --tail 6 --listen-self
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.55s
Running `target/debug/matrix-commander-rs --tail 6 --listen-self`
Redacted message: room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$i5Q8qjFwM6NmZxlqjt-OAMbBJDoddwzbTgBDzp0CKDo",
RoomRedaction: content: RoomRedactionEventContent { redacts: Some("$i5Q8qjFwM6NmZxlqjt-OAMbBJDoddwzbTgBDzp0CKDo"), reason: Some("test") }, redacts Some("$i5Q8qjFwM6NmZxlqjt-OAMbBJDoddwzbTgBDzp0CKDo"), room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$E8rPHXsTXbl-d5j8R6xl4wQTOKW2bVlcFgw7Cv_pXOw",
Redacted message: room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$_bFqEG3o-lewwQFAojAisXMwwAGVfP_QtrehyMH8jNc",
RoomRedaction: content: RoomRedactionEventContent { redacts: Some("$_bFqEG3o-lewwQFAojAisXMwwAGVfP_QtrehyMH8jNc"), reason: Some("test") }, redacts Some("$_bFqEG3o-lewwQFAojAisXMwwAGVfP_QtrehyMH8jNc"), room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$UOSvbIazgVt0Lc2W_rzyu01fSoXN9DTGdOQfEqfpcfo",
Message: type Text: body "Hello, world!", room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$IJaQX6VA-cvneDz03psqA57t3jQAdK3hcV2swijqs48", formatted None,
```
---
With the new `--skip-redacted` flag the expected behavior for these same room events will be:
```text
kevin@kevin-hp-840g10:~/matrix-commander-rs$ cargo run -- --tail 3 --skip-redacted --listen-self
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.55s
Running `target/debug/matrix-commander-rs --tail 3 --skip-redacted --listen-self`
RoomRedaction: content: RoomRedactionEventContent { redacts: Some("$i5Q8qjFwM6NmZxlqjt-OAMbBJDoddwzbTgBDzp0CKDo"), reason: Some("test") }, redacts Some("$i5Q8qjFwM6NmZxlqjt-OAMbBJDoddwzbTgBDzp0CKDo"), room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$E8rPHXsTXbl-d5j8R6xl4wQTOKW2bVlcFgw7Cv_pXOw",
RoomRedaction: content: RoomRedactionEventContent { redacts: Some("$_bFqEG3o-lewwQFAojAisXMwwAGVfP_QtrehyMH8jNc"), reason: Some("test") }, redacts Some("$_bFqEG3o-lewwQFAojAisXMwwAGVfP_QtrehyMH8jNc"), room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$UOSvbIazgVt0Lc2W_rzyu01fSoXN9DTGdOQfEqfpcfo",
Message: type Text: body "Hello, world!", room "!tELNSqxlPfJBLbWiax:matrix.org", sender "@kcexton:matrix.org", event id "$IJaQX6VA-cvneDz03psqA57t3jQAdK3hcV2swijqs48", formatted None,
```
note that `--tail` now needs to consume more than 3 events in order to find 3 printable events.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.