8go / 8go/matrix-commander-rs

Feature request: Add CLI argument to support redacted event elision in `--tail` calls.

Ouverte
#240 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
236
Forks
25
Merge moyen
4 h 30 min
PR mergées (30 j)
2

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.