mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-05-23 18:59:28 +00:00
fix message formating
This commit is contained in:
parent
aa295ccfab
commit
8672b30445
@ -115,9 +115,9 @@ proc encode*(message: Chat2Message): ProtoBuffer =
|
||||
|
||||
return serialised
|
||||
|
||||
proc toString*(message: Chat2Message): string =
|
||||
let time = message.timestamp.fromUnix().local().format("'<'MMM' 'dd,' 'HH:mm'>'")
|
||||
return time & " " & message.nick & ": " & string.fromBytes(message.payload)
|
||||
proc `$`*(message: Chat2Message): string =
|
||||
let time = message.timestamp.fromUnix().local().format("HH:mm")
|
||||
return time & "->" & message.nick & ": " & string.fromBytes(message.payload)
|
||||
|
||||
#####################
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user