parsav  Diff

Differences From Artifact [5c434424ea]:

To Artifact [0ee70a00a0]:


    14     14   	var spec    = lib.str.ref.null()
    15     15   	if hpath.ct >= 2 then
    16     16   		modestr = hpath(1)
    17     17   		if hpath.ct >= 3 then spec = hpath(2) end
    18     18   	end
    19     19   	var mode = modes.follow
    20     20   	var circle: uint64 = 0
           21  +	var reqPowers: lib.store.powerset
           22  +		reqPowers:clear()
           23  +		reqPowers.visible = true
    21     24   	if modestr:ref() then
    22         -		if     modestr:cmp('local' ) then mode = [modes['local']]
           25  +		if     modestr:cmp('local' ) then mode = [modes['local']] reqPowers.shout = true
    23     26   		elseif modestr:cmp('mutual') then mode = modes.mutual
    24         -		elseif modestr:cmp('fedi'  ) then mode = modes.fedi
           27  +		elseif modestr:cmp('fedi'  ) then mode = modes.fedi       reqPowers.shout = true
    25     28   		elseif modestr:cmp('circle') then mode = modes.circle
    26     29   		end
    27     30   	end
    28     31   	if requires_login(mode) and co.aid == 0 then mode = [modes['local']] end
    29     32   
    30     33   
    31     34   	var stoptime = lib.osclock.time(nil)
................................................................................
    97    100   		for i = 0, posts.sz do
    98    101   			var author = co:uid2actor(posts(i).ptr.author)
    99    102   			if mode == modes.mutual and posts(i).ptr.author ~= co.who.id then
   100    103   				if not author.relationship.recip.follow() then goto skip end
   101    104   			end
   102    105   			if author.relationship.rel.mute() or 
   103    106   			   author.relationship.rel.avoid() or 
   104         -			   author.relationship.recip.exclude() then goto skip end
          107  +			   author.relationship.recip.exclude() or
          108  +			  (not ((author.rights.powers and reqPowers) == reqPowers))
          109  +				 then goto skip end
   105    110   			if posts(i).ptr.rtdby ~= 0 then
   106    111   				var rter = co:uid2actor(posts(i).ptr.rtdby)
   107    112   				if rter.relationship.rel.mute()
   108    113   				or rter.relationship.rel.attenuate()
   109    114   				or rter.relationship.rel.avoid()
   110         -				or rter.relationship.recip.exclude() then goto skip end
          115  +				or rter.relationship.recip.exclude() 
          116  +				or (not ((rter.rights.powers and reqPowers) == reqPowers))
          117  +					 then goto skip end
   111    118   			end
   112    119   			lib.render.tweet(co, posts(i).ptr, &acc)
   113    120   			var t = lib.math.biggest(lib.math.biggest(posts(i).ptr.posted, posts(i).ptr.discovered),posts(i).ptr.edited)
   114    121   			if t > newest then newest = t end
   115    122   			::skip:: posts(i):free()
   116    123   		end
   117    124   		if posts.run > 0 then posts:free() end