From 19f9595e8bc1cadef92d646ebe13dac5cd2e9b03 Mon Sep 17 00:00:00 2001 From: Torsten Schulz Date: Sun, 18 Feb 2024 15:01:43 +0100 Subject: [PATCH] - Show timestamp of messages - Show warning, not to give out personal informations --- docroot/text.xml | 1 + src/app.cpp | 1 + src/broadcast.cpp | 2 ++ 3 files changed, 4 insertions(+) diff --git a/docroot/text.xml b/docroot/text.xml index b6c892b..6bfaddb 100644 --- a/docroot/text.xml +++ b/docroot/text.xml @@ -26,6 +26,7 @@

Welcome aboard!

We're thrilled to have you join our community. Here, honesty, friendliness, and respect are our guiding principles.

As you explore, remember to be yourself and treat others with kindness. We have zero tolerance for insults, harassment, or unauthorized content.

+

Please remember not to disclose personal information such as phone numbers, email addresses, residential addresses, etc.

Let's make this a welcoming space where everyone feels valued and safe. Welcome, and enjoy your time with us!

diff --git a/src/app.cpp b/src/app.cpp index 40c2f0f..e16e6ba 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -588,6 +588,7 @@ void App::renderChatLine(Wt::Json::Object &line, Wt::Json::Object conversation, } else { item = new Wt::WText(""); } + item->setToolTip(line["timestamp"]); item->setInline(false); } diff --git a/src/broadcast.cpp b/src/broadcast.cpp index 5001558..8fd8477 100644 --- a/src/broadcast.cpp +++ b/src/broadcast.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -677,6 +678,7 @@ Wt::Json::Object Broadcast::Message::json() { json["string"] = Wt::Json::Value(message); json["image"] = Wt::Json::Value(image); json["id"] = Wt::Json::Value(messageId); + json["timestamp"] = sendTime.toString(); return json; }