16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
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';
cache = false;
})
tiptr:free()
bdf:free()
end
return render_userpage
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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;
})
acc:lpush('<div id="feed" data-live="10">')
var newest: lib.store.timepoint = 0
for i = 0, posts.sz do
lib.render.tweet(co, posts(i).ptr, &acc)
var t = lib.math.biggest(lib.math.biggest(posts(i).ptr.posted, posts(i).ptr.discovered),posts(i).ptr.edited)
if t > newest then newest = t end
posts(i):free()
end
posts:free()
acc:lpush('</div>')
var bdf = acc:finalize()
co:livepage([lib.srv.convo.page] {
title = tiptr; body = bdf;
class = lib.str.plit 'profile';
cache = false;
}, newest)
tiptr:free()
bdf:free()
end
return render_userpage
|