From fd34c3955239329763e612854ab1fe077e45db88 Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Tue, 15 Nov 2022 15:56:38 +0400 Subject: [PATCH] core: fix voice msg content text representation --- src/Simplex/Chat/Protocol.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Chat/Protocol.hs b/src/Simplex/Chat/Protocol.hs index 7879841117..fc75850427 100644 --- a/src/Simplex/Chat/Protocol.hs +++ b/src/Simplex/Chat/Protocol.hs @@ -329,7 +329,7 @@ msgContentText = \case MCVoice {text, duration} -> if T.null text then msg else msg <> "; " <> text where - msg = "voice message " <> durationText duration <> "s" + msg = "voice message " <> durationText duration MCFile t -> t MCUnknown {text} -> text @@ -338,7 +338,7 @@ durationText duration = let (mins, secs) = duration `divMod` 60 in T.pack $ "(" <> with0 mins <> ":" <> with0 secs <> ")" where with0 n - | n < 9 = '0' : show n + | n <= 9 = '0' : show n | otherwise = show n msgContentTag :: MsgContent -> MsgContentTag