mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 17:37:43 +00:00
cleanup
This commit is contained in:
@ -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);
|
||||
|
@ -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]);
|
||||
|
Reference in New Issue
Block a user