From 37f550ac1e620dc0f3cddf37ced090dc9b0aa36f Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Fri, 6 Sep 2024 21:17:38 -0600 Subject: [PATCH] presence: escape colons, add more verbose time stuff --- src/modules/utility/presence.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/utility/presence.js b/src/modules/utility/presence.js index afb983a..d026712 100644 --- a/src/modules/utility/presence.js +++ b/src/modules/utility/presence.js @@ -172,9 +172,13 @@ presence.callback = async function (msg, line) { if (activity.timestamps) { if (activity.timestamps.start && !activity.timestamps.end) { - descLines.push(formatTime(Date.now() - activity.timestamps.start) + " elapsed"); + descLines.push(formatTime(Date.now() - activity.timestamps.start).replaceAll(":", "\\:") + " elapsed"); + descLines.push( + `-# \u2022 ${activity.timestamps.start}` + ); } else if (!activity.timestamps.start && activity.timestamps.end) { - descLines.push(formatTime(activity.timestamps.end - Date.now()) + " remaining"); + descLines.push(formatTime(activity.timestamps.end - Date.now()).replaceAll(":", "\\:") + " remaining"); + descLines.push(`-# \u2022 ${activity.timestamps.end}`); } else if (activity.timestamps.start != null && activity.timestamps.end != null) { const position = Date.now() - activity.timestamps.start; const length = activity.timestamps.end - activity.timestamps.start;