parsav  Artifact [7b79f9904c]

Artifact 7b79f9904c385a28e22b0d79b29b997968e6f940367fa3d44cb13bd1e2347ff6:


-- vim: ft=terra
local terra 
render_userpage(co: &lib.srv.convo, actor: &lib.store.actor)
	var ti: lib.str.acc 
	if co.aid ~= 0 and co.who.id == actor.id then
		ti:compose('my profile')
	else
		ti:compose('profile :: ', actor.handle)
	end
	var pftxt = lib.render.profile(co,actor) defer pftxt:free()

	var doc = data.view.docskel {
		instance = co.srv.cfg.instance;
		title = ti:finalize();
		body = pftxt;
		class = lib.str.plit 'profile';
		navlinks = co.navbar;
	}

	var hdrs = array(
		lib.http.header { 'Content-Type', 'text/html; charset=UTF-8' }
	)
	doc:send(co.con,200,[lib.mem.ptr(lib.http.header)] {ct = 1, ptr = &hdrs[0]})
	doc.title:free()
end

return render_userpage