fix channel username
This commit is contained in:
parent
f2da983635
commit
0f7b4c329e
|
@ -298,10 +298,11 @@ namespace tgcli.core
|
|||
var chat = getChat(msg.ChatId);
|
||||
var username = getFormattedUsername(sender);
|
||||
var time = formatTime(msg.Date);
|
||||
var isChannel = msg.IsChannelPost;
|
||||
var isPrivate = chat.Type is Td.TdApi.ChatType.ChatTypePrivate;
|
||||
|
||||
return $"{Ansi.Bold}{Ansi.Green}[{time}] {Ansi.Cyan}{chat.Title} " +
|
||||
$"{(isPrivate ? "" : $"{Ansi.Yellow}{username} ")}" +
|
||||
$"{(isPrivate || isChannel ? "" : $"{Ansi.Yellow}{username} ")}" +
|
||||
$"{(msg.IsOutgoing ? $"{Ansi.Blue}»»»" : $"{Ansi.Magenta}«««")} " +
|
||||
$"{text}";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue