parsav  Diff

Differences From Artifact [6a465decce]:

To Artifact [194a7e6d10]:


     1      1   -- vim: ft=terra
     2      2   local m = {
     3      3   	timepoint = lib.osclock.time_t;
     4      4   	scope = lib.enum {
     5      5   		'public', 'private', 'local';
     6      6   		'personal', 'direct', 'circle';
     7      7   	};
     8         -	notiftype = lib.enum {
     9         -		'none', 'mention', 'like', 'rt', 'react'
            8  +	noticetype = lib.enum {
            9  +		'none', 'mention', 'reply', 'like', 'rt', 'react'
    10     10   	};
    11     11   
    12     12   	relation = lib.set {
           13  +		'follow',
           14  +		'mute', -- posts will be completely hidden at all times
           15  +		'block', -- no interactions will be permitted, but posts will remain visible
    13     16   		'silence', -- messages will not be accepted
    14     17   		'collapse', -- posts will be collapsed by default
    15     18   		'disemvowel', -- posts will be ritually humiliated, but shown
    16     19   		'avoid', -- posts will be kept out of the timeline but will show on users' posts and in conversations
    17         -		'follow',
    18         -		'mute', -- posts will be completely hidden at all times
    19         -		'block', -- no interactions will be permitted, but posts will remain visible
           20  +		'exclude', -- own posts will not be visible to this user
    20     21   	};
    21     22   	credset = lib.set {
    22     23   		'pw', 'otp', 'challenge', 'trust'
    23     24   	};
    24     25   	privset = lib.set {
    25     26   		'post', 'edit', 'account', 'upload', 'moderate', 'admin', 'invite'
    26     27   	};
................................................................................
   242    243   	} do
   243    244   		be.entries[#be.entries+1] = {
   244    245   			field = 'actor_conf_'..n..'_'..k, type = t
   245    246   		}
   246    247   	end
   247    248   end
   248    249   
   249         -struct m.notif {
   250         -	kind: m.notiftype.t
          250  +struct m.notice {
          251  +	kind: m.noticetype.t
   251    252   	when: uint64
          253  +	who: uint64
          254  +	what: uint64
   252    255   	union {
   253         -		post: uint64
          256  +		reply: uint64
   254    257   		reaction: int8[16]
   255    258   	}
   256    259   }
   257    260   
   258    261   struct m.inet {
   259    262   	pv: uint8 -- 0 = null, 4 = ipv4, 6 = ipv6
   260    263   	union {
................................................................................
   343    346   
   344    347   	actor_create: {&m.source, &m.actor} -> uint64
   345    348   	actor_save: {&m.source, &m.actor} -> {}
   346    349   	actor_save_privs: {&m.source, &m.actor} -> {}
   347    350   	actor_purge_uid: {&m.source, uint64} -> {}
   348    351   	actor_fetch_xid: {&m.source, lib.mem.ptr(int8)} -> lib.mem.ptr(m.actor)
   349    352   	actor_fetch_uid: {&m.source, uint64} -> lib.mem.ptr(m.actor)
   350         -	actor_notif_fetch_uid: {&m.source, uint64} -> lib.mem.ptr(m.notif)
   351    353   	actor_enum: {&m.source} -> lib.mem.lstptr(m.actor)
   352    354   	actor_enum_local: {&m.source} -> lib.mem.lstptr(m.actor)
   353    355   	actor_stats: {&m.source, uint64} -> m.actor_stats
   354    356   	actor_rel: {&m.source, uint64, uint64} -> m.relationship
   355    357   
   356    358   	actor_auth_how: {&m.source, m.inet, rawstring} -> {m.credset, bool}
   357    359   		-- returns a set of auth method categories that are available for a
................................................................................
   386    388   			-- origin: inet
   387    389   			-- cookie issue time: m.timepoint
   388    390   	actor_auth_register_uid: {&m.source, uint64, uint64} -> {}
   389    391   		-- notifies the backend module of the UID that has been assigned for
   390    392   		-- an authentication ID
   391    393   			-- aid: uint64
   392    394   			-- uid: uint64
   393         -	actor_notifs_fetch: {&m.source, uint64} -> lib.mem.lstptr(m.notif)
          395  +	actor_notice_enum: {&m.source, uint64} -> lib.mem.lstptr(m.notice)
          396  +	actor_rel_create: {&m.source, uint16, uint64, uint64} -> {}
          397  +	actor_rel_destroy: {&m.source, uint16, uint64, uint64} -> {}
          398  +	actor_rel_calc: {&m.source, uint64, uint64} -> m.relationship
   394    399   
   395    400   	auth_enum_uid:    {&m.source, uint64}    -> lib.mem.lstptr(m.auth)
   396    401   	auth_enum_handle: {&m.source, rawstring} -> lib.mem.lstptr(m.auth)
   397    402   	auth_attach_pw: {&m.source, uint64, bool, pstr, pstr} -> {}
   398    403   		-- uid: uint64
   399    404   		-- reset: bool (delete other passwords?)
   400    405   		-- pw: pstring