Remove usage of old MatrixRoom.alias attribute in remaining places.
* Use calculated display name in the bar item. * Don't mention the room name in topic messages for groups.
This commit is contained in:
parent
654e39077d
commit
02bb64feab
3 changed files with 31 additions and 17 deletions
|
|
@ -706,15 +706,22 @@ class RoomTopicEvent(RoomEvent):
|
|||
nick_color=W.color(color_name), user=nick, ncolor=W.color("reset"))
|
||||
|
||||
# TODO print old topic if configured so
|
||||
message = ("{prefix}{nick} has changed "
|
||||
"the topic for {chan_color}{room}{ncolor} "
|
||||
"to \"{topic}\"").format(
|
||||
prefix=W.prefix("network"),
|
||||
nick=author,
|
||||
chan_color=W.color("chat_channel"),
|
||||
ncolor=W.color("reset"),
|
||||
room=room.display_name(server.user_id),
|
||||
topic=topic)
|
||||
if room.is_named():
|
||||
message = ("{prefix}{nick} has changed "
|
||||
"the topic for {chan_color}{room}{ncolor} "
|
||||
"to \"{topic}\"").format(
|
||||
prefix=W.prefix("network"),
|
||||
nick=author,
|
||||
chan_color=W.color("chat_channel"),
|
||||
ncolor=W.color("reset"),
|
||||
room=room.named_room_name(),
|
||||
topic=topic)
|
||||
else:
|
||||
message = ('{prefix}{nick} has changed the topic to '
|
||||
'"{topic}"').format(
|
||||
prefix=W.prefix("network"),
|
||||
nick=author,
|
||||
topic=topic)
|
||||
|
||||
tags = ["matrix_topic", "log3", "matrix_id_{}".format(self.event_id)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue