Skip to content

Commit

Permalink
--get-room-info does no longer return "creator"
Browse files Browse the repository at this point in the history
New protocol versions of room info do not carry `creator` anymore.
Hence `creator` was removed from output.
JSON output will also look differently.
Adjust your code if you pulled `creatore` from this API call.

See also: #190
See also: Issue #190
  • Loading branch information
8go committed Nov 1, 2024
1 parent 5e5f169 commit 0d12760
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 31 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1616,16 +1616,17 @@ options:
room alias (e.g. '#SomeRoomAlias:matrix.example.com'),
or short alias (e.g. 'SomeRoomAlias' or
'#SomeRoomAlias'). As response room id, room display
name, room canonical alias, room topic, room creator,
and room encryption are printed. One line per room
will be printed. Since either room id or room alias
are accepted as input and both room id and room alias
are given as output, one can hence use this option to
map from room id to room alias as well as vice versa
from room alias to room id. Do not confuse this option
with the options '--get-display-name' and '--set-
display-name', which get/set the user display name,
not the room display name.
name, room canonical alias, room topic, and room
encryption are printed. One line per room will be
printed. If --output is set to JSON a lot more
information will be printed. Since either room id or
room alias are accepted as input and both room id and
room alias are given as output, one can hence use this
option to map from room id to room alias as well as
vice versa from room alias to room id. Do not confuse
this option with the options '--get-display-name' and
'--set-display-name', which get/set the user display
name, not the room display name.
--get-client-info Print client information. Details:: Print information
kept in the client, i.e. matrix-commander. Output is
printed in JSON format.
Expand Down Expand Up @@ -1944,7 +1945,7 @@ options:
the program will continue to run. This is useful for
having version number in the log files.
You are running version 7.7.1 2024-10-21. Enjoy, star on Github and contribute
You are running version 8.0.0 2024-11-01. Enjoy, star on Github and contribute
by submitting a Pull Request. Also have a look at matrix-commander-tui.
```

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.7.1
8.0.0
Binary file removed dist/matrix_commander-7.7.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/matrix_commander-7.7.1.tar.gz
Binary file not shown.
Binary file added dist/matrix_commander-8.0.0-py3-none-any.whl
Binary file not shown.
Binary file added dist/matrix_commander-8.0.0.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion help.help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,5 @@ delete-content ROOM_ID EVENT_ID REASON [ROOM_ID EVENT_ID REASON ...]
-v [PRINT|CHECK], -V [PRINT|CHECK], --version [PRINT|CHECK]
Print version information or check for updates.

You are running version 7.7.1 2024-10-21. Enjoy, star on Github and contribute
You are running version 8.0.0 2024-11-01. Enjoy, star on Github and contribute
by submitting a Pull Request. Also have a look at matrix-commander-tui.
23 changes: 12 additions & 11 deletions help.manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -856,16 +856,17 @@ options:
room alias (e.g. '#SomeRoomAlias:matrix.example.com'),
or short alias (e.g. 'SomeRoomAlias' or
'#SomeRoomAlias'). As response room id, room display
name, room canonical alias, room topic, room creator,
and room encryption are printed. One line per room
will be printed. Since either room id or room alias
are accepted as input and both room id and room alias
are given as output, one can hence use this option to
map from room id to room alias as well as vice versa
from room alias to room id. Do not confuse this option
with the options '--get-display-name' and '--set-
display-name', which get/set the user display name,
not the room display name.
name, room canonical alias, room topic, and room
encryption are printed. One line per room will be
printed. If --output is set to JSON a lot more
information will be printed. Since either room id or
room alias are accepted as input and both room id and
room alias are given as output, one can hence use this
option to map from room id to room alias as well as
vice versa from room alias to room id. Do not confuse
this option with the options '--get-display-name' and
'--set-display-name', which get/set the user display
name, not the room display name.
--get-client-info Print client information. Details:: Print information
kept in the client, i.e. matrix-commander. Output is
printed in JSON format.
Expand Down Expand Up @@ -1184,5 +1185,5 @@ options:
the program will continue to run. This is useful for
having version number in the log files.

You are running version 7.7.1 2024-10-21. Enjoy, star on Github and contribute
You are running version 8.0.0 2024-11-01. Enjoy, star on Github and contribute
by submitting a Pull Request. Also have a look at matrix-commander-tui.
2 changes: 1 addition & 1 deletion help.usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ usage: matrix-commander [--usage] [-h] [--manual] [--readme] [-d]
[--room-invites [LIST|JOIN|LIST+JOIN]]
[-v [PRINT|CHECK]]

You are running version 7.7.1 2024-10-21. Enjoy, star on Github and contribute
You are running version 8.0.0 2024-11-01. Enjoy, star on Github and contribute
by submitting a Pull Request. Also have a look at matrix-commander-tui.
13 changes: 8 additions & 5 deletions matrix_commander/matrix_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
HAVE_OPENID = False

# version number
VERSION = "2024-10-21"
VERSIONNR = "7.7.1"
VERSION = "2024-11-01"
VERSIONNR = "8.0.0"
# matrix-commander; for backwards compitability replace _ with -
PROG_WITHOUT_EXT = os.path.splitext(os.path.basename(__file__))[0].replace(
"_", "-"
Expand Down Expand Up @@ -5646,13 +5646,15 @@ async def action_get_room_info(client: AsyncClient, credentials: dict) -> None:
f"room id is {room_id}, "
f"room display name is {room_displayname}, "
f"room is {room}. "
f"room dict is {room.__dict__}. "
)
resp = room
# output format controlled via --output flag
text = (
f"{room_id}{SEP}{room_displayname}{SEP}"
f"{room.canonical_alias}{SEP}{room.topic}{SEP}"
f"{room.creator}{SEP}{room.encrypted}"
f"{room.canonical_alias}{SEP}{room.topic}"
f"{SEP}{room.encrypted}"
# f"{SEP}{room.own_user_id}"
# f"{SEP}{user_id}"
)
# Object of type xxxResponse is not JSON
Expand Down Expand Up @@ -9234,8 +9236,9 @@ def main_inner(
"or short alias (e.g. 'SomeRoomAlias' or '#SomeRoomAlias'). "
"As response "
"room id, room display name, room canonical alias, room topic, "
"room creator, and room encryption "
"and room encryption "
"are printed. One line per room will be printed. "
"If --output is set to JSON a lot more information will be printed. "
"Since either room id or room alias are accepted as input and both "
"room id and room alias are given as output, one can hence use this "
"option to map from room id to room alias "
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://packaging.python.org/en/latest/tutorials/packaging-projects/
# https://setuptools.pypa.io/en/latest/userguide/
name = matrix-commander
version = 7.7.1
version = 8.0.0
author = 8go
description = A simple command-line Matrix client
long_description = file: PyPi-Instructions.md, README.md
Expand Down

0 comments on commit 0d12760

Please sign in to comment.