Only put a prefix string if there is a prefix.
This commit is contained in:
parent
92b35dfd8c
commit
a606ac088a
1 changed files with 2 additions and 2 deletions
|
@ -275,8 +275,8 @@ class RoomMessageEvent(RoomEvent):
|
||||||
|
|
||||||
prefix, prefix_color = sender_to_prefix_and_color(room, self.sender)
|
prefix, prefix_color = sender_to_prefix_and_color(room, self.sender)
|
||||||
|
|
||||||
prefix_string = "{}{}{}".format(
|
prefix_string = ("" if not prefix else "{}{}{}".format(
|
||||||
W.color(prefix_color), prefix, W.color("reset"))
|
W.color(prefix_color), prefix, W.color("reset")))
|
||||||
|
|
||||||
data = "{prefix}{color}{author}{ncolor}\t{msg}".format(
|
data = "{prefix}{color}{author}{ncolor}\t{msg}".format(
|
||||||
prefix=prefix_string,
|
prefix=prefix_string,
|
||||||
|
|
Loading…
Add table
Reference in a new issue