parsav  Diff

Differences From Artifact [9774faf032]:

To Artifact [edce0da550]:


3
4
5
6
7
8
9



10















11
12
13
14
15
16
17

18
19
20
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 tiptr = ti:finalize()
	co:stdpage([lib.srv.convo.page] {
		title = tiptr; body = pftxt;
		class = lib.str.plit 'profile';
	})

	tiptr:free()

end

return render_userpage







>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|




>



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 tiptr = ti:finalize()

	var acc: lib.str.acc acc:init(1024)
	var pftxt = lib.render.profile(co,actor) defer pftxt:free()
	acc:ppush(pftxt)

	var stoptime = lib.osclock.time(nil)
	var posts = co.srv:post_enum_author_uid(actor.id, lib.store.range {
		mode = 1; -- T->I
		from_time = stoptime;
		to_idx = 64;
	})

	for i = 0, posts.sz do
		lib.render.tweet(co, posts(i).ptr, &acc)
		posts(i):free()
	end
	posts:free()

	var bdf = acc:finalize()
	co:stdpage([lib.srv.convo.page] {
		title = tiptr; body = bdf;
		class = lib.str.plit 'profile';
	})

	tiptr:free()
	bdf:free()
end

return render_userpage