2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
...
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
|
local m = {
timepoint = lib.osclock.time_t;
scope = lib.enum {
'public', 'private', 'local';
'personal', 'direct', 'circle';
};
noticetype = lib.enum {
'none', 'mention', 'reply', 'like', 'rt', 'react', 'follow'
};
relation = lib.set {
'follow',
'subscribe', -- get a notification for every post
'mute', -- posts will be completely hidden at all times
'block', -- no interactions will be permitted, but posts will remain visible
'silence', -- messages will not be accepted
'collapse', -- posts will be collapsed by default
'disemvowel', -- posts will be ritually humiliated, but shown
'avoid', -- posts will be kept out of the timeline but will show on users' posts and in conversations
'exclude', -- own posts will not be visible to this user
................................................................................
(pow.propagate << true)
(pow.artifact << true)
(pow.account << true)
(pow.edit << true)
(pow.snitch << true)
return m.rights { rank = 0, quota = 1000, invites = 0, powers = pow; }
end
struct m.actor {
id: uint64
nym: str
handle: str
origin: uint64
bio: str
................................................................................
knownsince: m.timepoint
rights: m.rights
key: lib.mem.ptr(uint8)
-- ephemera
xid: str
source: &m.source
}
terra m.actor:outranks(other: &m.actor)
-- this predicate determines where two users stand relative to
-- each other in the formal staff hierarchy. it is used in
-- authority calculations, but this function should only be
-- used directly in rendering code and by other predicates.
................................................................................
aname: str
comment: str
netmask: m.inet
privs: m.privset
blacklist: bool
}
struct m.relationship {
agent: uint64
patient: uint64
rel: m.relation -- agent → patient
recip: m.relation -- patient → agent
}
-- backends only handle content on the local server
struct m.backend { id: rawstring
open: &m.source -> &opaque
close: &m.source -> {}
dbsetup: &m.source -> bool -- creates the schema needed to call conprep (called only once per database e.g. with `parsav db init`)
conprep: {&m.source, m.prepmode.t} -> {} -- prepares queries and similar tasks that require the schema to already be in place
obliterate_everything: &m.source -> bool -- wipes everything parsav-related out of the database
|
>
>
|
|
>
>
>
>
>
>
>
>
<
<
<
<
<
<
<
|
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
...
340
341
342
343
344
345
346
347
348
349
350
351
352
353
|
local m = {
timepoint = lib.osclock.time_t;
scope = lib.enum {
'public', 'private', 'local';
'personal', 'direct', 'circle';
};
noticetype = lib.enum {
-- only add new values to the end of this list! the numerical value
-- is stored in the database and must be kept synchronized across versions
'none', 'mention', 'reply', 'like', 'rt', 'react', 'follow', 'followreq'
};
relation = lib.set {
'follow',
'sub', -- get a notification for every post
'mute', -- posts will be completely hidden at all times
'block', -- no interactions will be permitted, but posts will remain visible
'silence', -- messages will not be accepted
'collapse', -- posts will be collapsed by default
'disemvowel', -- posts will be ritually humiliated, but shown
'avoid', -- posts will be kept out of the timeline but will show on users' posts and in conversations
'exclude', -- own posts will not be visible to this user
................................................................................
(pow.propagate << true)
(pow.artifact << true)
(pow.account << true)
(pow.edit << true)
(pow.snitch << true)
return m.rights { rank = 0, quota = 1000, invites = 0, powers = pow; }
end
struct m.relationship {
agent: uint64
patient: uint64
rel: m.relation -- agent → patient
recip: m.relation -- patient → agent
}
struct m.actor {
id: uint64
nym: str
handle: str
origin: uint64
bio: str
................................................................................
knownsince: m.timepoint
rights: m.rights
key: lib.mem.ptr(uint8)
-- ephemera
xid: str
source: &m.source
relationship: m.relationship -- relationship to the logged-in user, if any
}
terra m.actor:outranks(other: &m.actor)
-- this predicate determines where two users stand relative to
-- each other in the formal staff hierarchy. it is used in
-- authority calculations, but this function should only be
-- used directly in rendering code and by other predicates.
................................................................................
aname: str
comment: str
netmask: m.inet
privs: m.privset
blacklist: bool
}
-- backends only handle content on the local server
struct m.backend { id: rawstring
open: &m.source -> &opaque
close: &m.source -> {}
dbsetup: &m.source -> bool -- creates the schema needed to call conprep (called only once per database e.g. with `parsav db init`)
conprep: {&m.source, m.prepmode.t} -> {} -- prepares queries and similar tasks that require the schema to already be in place
obliterate_everything: &m.source -> bool -- wipes everything parsav-related out of the database
|