Differences From
Artifact [cdf1e65d22]:
1 1 -- vim: ft=terra
2 2 local terra
3 3 render_userpage(co: &lib.srv.convo, actor: &lib.store.actor)
4 - var ti: lib.str.acc defer ti:free()
4 + var ti: lib.str.acc
5 5 if co.aid ~= 0 and co.who.id == actor.id then
6 6 ti:compose('my profile')
7 7 else
8 8 ti:compose('profile :: ', actor.handle)
9 9 end
10 10 var pftxt = lib.render.profile(co,actor) defer pftxt:free()
11 11
12 12 var doc = data.view.docskel {
13 - instance = co.srv.cfg.instance.ptr;
14 - title = ti.buf;
15 - body = pftxt.ptr;
16 - class = 'profile';
17 - navlinks = co.navbar.ptr;
13 + instance = co.srv.cfg.instance;
14 + title = ti:finalize();
15 + body = pftxt;
16 + class = lib.str.plit 'profile';
17 + navlinks = co.navbar;
18 18 }
19 19
20 20 var hdrs = array(
21 21 lib.http.header { 'Content-Type', 'text/html; charset=UTF-8' }
22 22 )
23 23 doc:send(co.con,200,[lib.mem.ptr(lib.http.header)] {ct = 1, ptr = &hdrs[0]})
24 + doc.title:free()
24 25 end
25 26
26 27 return render_userpage