sort threads in topic by activity by default (bump) and add setting

This commit is contained in:
2025-06-01 14:04:45 +03:00
parent 24d6d7cebf
commit b56ab2522c
3 changed files with 22 additions and 11 deletions

View File

@ -261,7 +261,9 @@ app:post("user_settings", "/:username/settings", function(self)
if me.id ~= target_user.id then
return {redirect_to = self:url_for("user", {username = self.params.username})}
end
if self.params.topic_sort_by == "activity" or self.params.topic_sort_by == "thread" then
self.session.sort_by = self.params.topic_sort_by
end
local status = self.params.status:sub(1, 100)
local original_sig = self.params.signature or ""
local rendered_sig = babycode.to_html(original_sig, html_escape)