- Show timestamp of messages

- Show warning, not to give out personal informations
This commit is contained in:
Torsten Schulz
2024-02-18 15:01:43 +01:00
parent 5e434017ab
commit 19f9595e8b
3 changed files with 4 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
<h2>Welcome aboard!</h2> <h2>Welcome aboard!</h2>
<p>We're thrilled to have you join our community. Here, honesty, friendliness, and respect are our guiding principles.</p> <p>We're thrilled to have you join our community. Here, honesty, friendliness, and respect are our guiding principles.</p>
<p>As you explore, remember to be yourself and treat others with kindness. We have zero tolerance for insults, harassment, or unauthorized content.</p> <p>As you explore, remember to be yourself and treat others with kindness. We have zero tolerance for insults, harassment, or unauthorized content.</p>
<p>Please remember not to disclose personal information such as phone numbers, email addresses, residential addresses, etc.</p>
<p>Let's make this a welcoming space where everyone feels valued and safe. Welcome, and enjoy your time with us!</p> <p>Let's make this a welcoming space where everyone feels valued and safe. Welcome, and enjoy your time with us!</p>
</main> </main>
</message> </message>

View File

@@ -588,6 +588,7 @@ void App::renderChatLine(Wt::Json::Object &line, Wt::Json::Object conversation,
} else { } else {
item = new Wt::WText(""); item = new Wt::WText("");
} }
item->setToolTip(line["timestamp"]);
item->setInline(false); item->setInline(false);
} }

View File

@@ -4,6 +4,7 @@
#include <Wt/Json/Array.h> #include <Wt/Json/Array.h>
#include <Wt/Json/Serializer.h> #include <Wt/Json/Serializer.h>
#include <Wt/Auth/HashFunction.h> #include <Wt/Auth/HashFunction.h>
#include <Wt/WLocalDateTime.h>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
@@ -677,6 +678,7 @@ Wt::Json::Object Broadcast::Message::json() {
json["string"] = Wt::Json::Value(message); json["string"] = Wt::Json::Value(message);
json["image"] = Wt::Json::Value(image); json["image"] = Wt::Json::Value(image);
json["id"] = Wt::Json::Value(messageId); json["id"] = Wt::Json::Value(messageId);
json["timestamp"] = sendTime.toString();
return json; return json;
} }