8go / 8go/matrix-commander-rs

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

Abierto
#240 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
236
Forks
25
Merge medio
4 h 30 min
PR fusionados (30 d)
2

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.