Differences From
Artifact [fad3f537df]:
13 13 acc:lpush('</a> retweeted</div>')
14 14 if co.aid ~= 0 and co.who.id == rter.id then
15 15 acc:lpush('<a href="/post/'):shpush(rid):lpush('/del" class="del">✖</a>')
16 16 end
17 17 end
18 18
19 19 local terra
20 -render_tweet(co: &lib.srv.convo, p: &lib.store.post, acc: &lib.str.acc)
20 +render_tweet(co: &lib.srv.convo, p: &lib.store.post, acc: &lib.str.acc): pstr
21 21 var author: &lib.store.actor = nil
22 22 var retweeter: &lib.store.actor = nil
23 23 for j = 0, co.actorcache.top do
24 24 if p.author == co.actorcache(j).ptr.id then author = co.actorcache(j).ptr end
25 25 if p.rtdby == co.actorcache(j).ptr.id then retweeter = co.actorcache(j).ptr end
26 26 if author ~= nil and (p.rtdby == 0 or retweeter ~= nil) then
27 27 goto foundauth
................................................................................
31 31 author = co.actorcache:insert(co:uid2actor_live(p.author)).ptr
32 32 end
33 33 if p.rtdby ~= 0 and retweeter == nil then
34 34 retweeter = co.actorcache:insert(co:uid2actor_live(p.rtdby)).ptr
35 35 end
36 36
37 37 ::foundauth::
38 + if author.relationship.rel.mute() or
39 + author.relationship.recip.exclude() then return '' end
40 +
38 41 var timestr: int8[26] lib.osclock.ctime_r(&p.posted, ×tr[0])
39 42 for i=0,26 do if timestr[i] == @'\n' then timestr[i] = 0 break end end -- 🙄
40 -
41 - var bhtml = lib.smackdown.html(&co.srv.pool, [lib.mem.ptr(int8)] {ptr=p.body,ct=0},false)
43 + var ptxt = pstr {ptr=p.body,ct=lib.str.sz(p.body)}
44 + if author.relationship.rel.disemvowel() then
45 + ptxt = lib.str.disemvowel(&co.srv.pool, ptxt)
46 + end
47 + var bhtml = lib.smackdown.html(&co.srv.pool, ptxt,false)
42 48 --defer bhtml:free()
43 49
44 50 var idbuf: int8[lib.math.shorthand.maxlen]
45 51 var idlen = lib.math.shorthand.gen(p.id, idbuf)
46 52 var permalink: lib.str.acc permalink:pool(&co.srv.pool, 7+idlen):lpush('/post/'):push(idbuf,idlen)
47 53 var fullname = lib.render.nym(author,0,nil, false) defer fullname:free()
48 54 var tpl = data.view.tweet {