8go / matrix-commander-rs

simple but convenient CLI-based Matrix client app for sending and receiving (in Rust)
GNU General Public License v3.0
79 stars 2 forks source link

Enhancement: Can we get the room_id from --listen once? #47

Closed ghost closed 9 months ago

ghost commented 1 year ago

No doubt I don't get what's going on here... but I'm trying to work out how to listen for new messages and display what room they came from. Just curious why the room_ID comes back from --listen tail and not from --listen once? If I'm using --listen once to get my updates, I can't associate them to a room.

Room ID in "tail"

>matrix-commander-rs --output json --listen-self --listen tail --tail 1  | jq -r '.|keys'
[
  "age",
  "content",
  "event_id",
  "origin_server_ts",
  "room_id",
  "sender",
  "type",
  "unsigned",
  "user_id"
]

No room ID in "once"

matrix-commander-rs --output json --listen-self --listen once  | jq -r '.|keys'
[
  "content",
  "event_id",
  "origin_server_ts",
  "sender",
  "type"
]
ghost commented 1 year ago

Oh I neglected to try outputting in the text format which does return the room. This can work. Closing. .

ghost commented 1 year ago

using the text format does not return entries for non text things like files. As such my issue still stands with not being able to get the room ID using the json format with listen once, or forever

8go commented 9 months ago

Try the new version. The JSON output should now always provide the room_id