This commit is contained in:
Doug Hoyte
2024-12-19 19:48:40 -05:00
parent ff2424a5ef
commit f130721d71
2 changed files with 2 additions and 15 deletions

View File

@ -280,19 +280,6 @@ struct Event {
output.text = std::move(content);
output.url = std::move(firstUrl);
/*
if (withLink && firstUrl.size()) {
while (content.size() && isspace(content.back())) content.pop_back();
if (content.empty()) {
content = firstUrl;
textAbbrev(content, 100);
templarInternal::htmlEscape(content, true);
}
return std::string("<a href=\"") + templarInternal::htmlEscape(firstUrl, true) + "\">" + content + "</a>";
}
*/
return output;
}
@ -543,7 +530,7 @@ struct EventThread {
}
std::string getSummary() {
std::string getThreadTitle() {
if (!rootEventId.size()) return "";
auto p = eventCache.find(rootEventId);

View File

@ -208,7 +208,7 @@ HTTPResponse WebServer::generateReadResponse(lmdb::txn &txn, Decompressor &decom
if (u.path.size() == 2) {
EventThread et(txn, decomp, decodeBech32Simple(u.path[1]));
body = et.render(txn, decomp, userCache);
title = et.getSummary();
title = et.getThreadTitle();
} else if (u.path.size() == 3) {
if (u.path[2] == "reply") {
auto ev = Event::fromIdExternal(txn, u.path[1]);