16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
if meth == method.post then
var act = co:ppostv('act')
if rel.recip.block() then
if act:cmp('follow') or act:cmp('subscribe') then
co:complain(403,'blocked','you cannot follow a user you are blocked by') return
end
end
if act:cmp('block') and not rel.rel.block() then
rel.rel.block = true rel.recip.follow = false
co.srv:actor_rel_create([lib.store.relation.idvmap.block], co.who.id, actor.id)
co.srv:actor_rel_destroy([lib.store.relation.idvmap.follow], actor.id, co.who.id)
elseif not act:cmp('report') then
[(function()
local tests = quote co:complain(400,'bad request','the action you have attempted on this user is not meaningful') return end
for i,v in ipairs(lib.store.relation.members) do
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
if meth == method.post then
var act = co:ppostv('act')
if rel.recip.block() then
if act:cmp('follow') or act:cmp('subscribe') then
co:complain(403,'blocked','you cannot follow a user you are blocked by') return
end
end
if act:cmp('circle') then
lib.dbg('encircling user!')
var iter = co:eachpostv('circle')
for cid in iter do
end
elseif act:cmp('block') and not rel.rel.block() then
rel.rel.block = true rel.recip.follow = false
co.srv:actor_rel_create([lib.store.relation.idvmap.block], co.who.id, actor.id)
co.srv:actor_rel_destroy([lib.store.relation.idvmap.follow], actor.id, co.who.id)
elseif not act:cmp('report') then
[(function()
local tests = quote co:complain(400,'bad request','the action you have attempted on this user is not meaningful') return end
for i,v in ipairs(lib.store.relation.members) do
|