65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
if not parent then
lib.bail('schema integrity violation - could not match post to parent')
end
var pauth = co.srv:actor_fetch_uid(parent(0).author) defer pauth:free()
var pidbuf: int8[lib.math.shorthand.maxlen]
var pidlen = lib.math.shorthand.gen(p.parent, pidbuf)
var pa: lib.str.acc pa:init(128)
pa:lpush('<small>in reply to <a class="username" href="'):push(&pidbuf[0],pidlen):lpush('">')
lib.render.nym(pauth.ptr,0,&pa,true)
pa:lpush('</a></small>')
tpl.extra = pa:finalize()
end
if p.rts + p.likes > 0 then
var s: lib.str.acc s:init(128)
s:lpush('<div class="stats">')
|
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
if not parent then
lib.bail('schema integrity violation - could not match post to parent')
end
var pauth = co.srv:actor_fetch_uid(parent(0).author) defer pauth:free()
var pidbuf: int8[lib.math.shorthand.maxlen]
var pidlen = lib.math.shorthand.gen(p.parent, pidbuf)
var pa: lib.str.acc pa:init(128)
pa:lpush('<small>in reply to <a class="username" href="/post/'):push(&pidbuf[0],pidlen):lpush('">')
lib.render.nym(pauth.ptr,0,&pa,true)
pa:lpush('</a></small>')
tpl.extra = pa:finalize()
end
if p.rts + p.likes > 0 then
var s: lib.str.acc s:init(128)
s:lpush('<div class="stats">')
|