mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 22:34:56 +00:00
12 lines
254 B
Lua
12 lines
254 B
Lua
local M = {}
|
|
|
|
function M.rank_thread(thread)
|
|
local replies = thread.replyCount or 0
|
|
local likes = thread.likeCount or 0
|
|
local recency = thread.lastReplyAt or thread.createdAt or 0
|
|
|
|
return (replies * 2) + likes + (recency / 1000000)
|
|
end
|
|
|
|
return M
|