tangled
alpha
login
or
join now
bretton.dev
/
coves
11
fork
atom
A community based topic aggregation platform built on atproto
11
fork
atom
overview
issues
pulls
pipelines
Adding crosspost logic to lexicon
Bretton May
8 months ago
7b26e06e
549de011
+250
-16
10 changed files
expand all
collapse all
unified
split
internal
atproto
lexicon
social
coves
actor
membership.json
subscription.json
community
rules.json
post
article.json
crosspost.json
getCrosspostChain.json
image.json
microblog.json
text.json
video.json
+2
-7
internal/atproto/lexicon/social/coves/actor/membership.json
···
4
4
"defs": {
5
5
"main": {
6
6
"type": "record",
7
7
-
"description": "Membership in a community (has reputation)",
7
7
+
"description": "Membership in a community",
8
8
"key": "tid",
9
9
"record": {
10
10
"type": "object",
···
21
21
"default": 0,
22
22
"description": "Reputation score within the community"
23
23
},
24
24
-
"subscribedAt": {
25
25
-
"type": "string",
26
26
-
"format": "datetime",
27
27
-
"description": "When the user subscribed to a community"
28
28
-
},
29
24
"createdAt": {
30
25
"type": "string",
31
26
"format": "datetime",
32
32
-
"description": "When the user was created"
27
27
+
"description": "When the user's membership started"
33
28
},
34
29
"endedAt": {
35
30
"type": "string",
+2
-1
internal/atproto/lexicon/social/coves/actor/subscription.json
···
17
17
},
18
18
"createdAt": {
19
19
"type": "string",
20
20
-
"format": "datetime"
20
20
+
"format": "datetime",
21
21
+
"description": "When the subscription started"
21
22
},
22
23
"endedAt": {
23
24
"type": "string",
+43
-8
internal/atproto/lexicon/social/coves/community/rules.json
···
59
59
"type": "object",
60
60
"description": "Allowed post types in the community",
61
61
"properties": {
62
62
-
"textOnly": {
62
62
+
"allowText": {
63
63
"type": "boolean",
64
64
-
"default": false,
65
65
-
"description": "Restrict to text posts only"
64
64
+
"default": true,
65
65
+
"description": "Allow text posts"
66
66
},
67
67
"allowVideo": {
68
68
"type": "boolean",
69
69
-
"default": true
69
69
+
"default": true,
70
70
+
"description": "Allow video posts"
70
71
},
71
72
"allowImage": {
72
73
"type": "boolean",
73
73
-
"default": true
74
74
+
"default": true,
75
75
+
"description": "Allow image posts"
74
76
},
75
77
"allowArticle": {
76
78
"type": "boolean",
77
77
-
"default": true
79
79
+
"default": true,
80
80
+
"description": "Allow Article posts"
78
81
}
79
82
}
80
83
},
···
130
133
"tagThreshold": {
131
134
"type": "integer",
132
135
"minimum": 1,
133
133
-
"default": 5,
136
136
+
"default": 15,
134
137
"description": "Number of tags needed to trigger action"
135
138
},
136
139
"tribunalThreshold": {
137
140
"type": "integer",
138
141
"minimum": 1,
139
139
-
"default": 3,
142
142
+
"default": 50,
140
143
"description": "Number of tags to trigger tribunal review"
141
144
},
142
145
"jurySize": {
···
144
147
"minimum": 9,
145
148
"default": 9,
146
149
"description": "Number of jurors for tribunal"
150
150
+
}
151
151
+
}
152
152
+
},
153
153
+
"rule": {
154
154
+
"type": "object",
155
155
+
"description": "A text-based community rule for display purposes",
156
156
+
"required": ["title", "description", "createdAt", "isActive"],
157
157
+
"properties": {
158
158
+
"title": {
159
159
+
"type": "string",
160
160
+
"maxLength": 256,
161
161
+
"description": "Short rule title (e.g., 'No Editorialized Titles')"
162
162
+
},
163
163
+
"description": {
164
164
+
"type": "string",
165
165
+
"maxLength": 2000,
166
166
+
"description": "Detailed explanation of the rule"
167
167
+
},
168
168
+
"createdAt": {
169
169
+
"type": "string",
170
170
+
"format": "datetime",
171
171
+
"description": "When the rule was created"
172
172
+
},
173
173
+
"isActive": {
174
174
+
"type": "boolean",
175
175
+
"default": true,
176
176
+
"description": "Whether the rule is currently active"
177
177
+
},
178
178
+
"disabledAt": {
179
179
+
"type": "string",
180
180
+
"format": "datetime",
181
181
+
"description": "When the rule was disabled (optional)"
147
182
}
148
183
}
149
184
}
+13
internal/atproto/lexicon/social/coves/post/article.json
···
86
86
"type": "ref",
87
87
"ref": "social.coves.actor.profile#geoLocation"
88
88
},
89
89
+
"crosspostOf": {
90
90
+
"type": "string",
91
91
+
"format": "at-uri",
92
92
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
93
93
+
},
94
94
+
"crosspostChain": {
95
95
+
"type": "array",
96
96
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
97
97
+
"items": {
98
98
+
"type": "string",
99
99
+
"format": "at-uri"
100
100
+
}
101
101
+
},
89
102
"createdAt": {
90
103
"type": "string",
91
104
"format": "datetime"
+39
internal/atproto/lexicon/social/coves/post/crosspost.json
···
1
1
+
{
2
2
+
"lexicon": 1,
3
3
+
"id": "social.coves.post.crosspost",
4
4
+
"defs": {
5
5
+
"main": {
6
6
+
"type": "record",
7
7
+
"description": "A record tracking crosspost relationships between posts",
8
8
+
"key": "tid",
9
9
+
"record": {
10
10
+
"type": "object",
11
11
+
"required": ["originalPost", "crosspostOf", "createdAt"],
12
12
+
"properties": {
13
13
+
"originalPost": {
14
14
+
"type": "string",
15
15
+
"format": "at-uri",
16
16
+
"description": "AT-URI of the original post in the crosspost chain"
17
17
+
},
18
18
+
"crosspostOf": {
19
19
+
"type": "string",
20
20
+
"format": "at-uri",
21
21
+
"description": "AT-URI of the immediate parent this is a crosspost of"
22
22
+
},
23
23
+
"allCrossposts": {
24
24
+
"type": "array",
25
25
+
"description": "Array of AT-URIs of all posts in the crosspost chain",
26
26
+
"items": {
27
27
+
"type": "string",
28
28
+
"format": "at-uri"
29
29
+
}
30
30
+
},
31
31
+
"createdAt": {
32
32
+
"type": "string",
33
33
+
"format": "datetime"
34
34
+
}
35
35
+
}
36
36
+
}
37
37
+
}
38
38
+
}
39
39
+
}
+99
internal/atproto/lexicon/social/coves/post/getCrosspostChain.json
···
1
1
+
{
2
2
+
"lexicon": 1,
3
3
+
"id": "social.coves.post.getCrosspostChain",
4
4
+
"defs": {
5
5
+
"main": {
6
6
+
"type": "procedure",
7
7
+
"description": "Get all crossposts in a crosspost chain for a given post",
8
8
+
"input": {
9
9
+
"encoding": "application/json",
10
10
+
"schema": {
11
11
+
"type": "object",
12
12
+
"required": ["uri"],
13
13
+
"properties": {
14
14
+
"uri": {
15
15
+
"type": "string",
16
16
+
"format": "at-uri",
17
17
+
"description": "AT-URI of any post in the crosspost chain"
18
18
+
}
19
19
+
}
20
20
+
}
21
21
+
},
22
22
+
"output": {
23
23
+
"encoding": "application/json",
24
24
+
"schema": {
25
25
+
"type": "object",
26
26
+
"required": ["crossposts"],
27
27
+
"properties": {
28
28
+
"crossposts": {
29
29
+
"type": "array",
30
30
+
"description": "All posts in the crosspost chain",
31
31
+
"items": {
32
32
+
"type": "ref",
33
33
+
"ref": "#crosspostView"
34
34
+
}
35
35
+
}
36
36
+
}
37
37
+
}
38
38
+
}
39
39
+
},
40
40
+
"crosspostView": {
41
41
+
"type": "object",
42
42
+
"required": ["uri", "community", "author", "createdAt"],
43
43
+
"properties": {
44
44
+
"uri": {
45
45
+
"type": "string",
46
46
+
"format": "at-uri",
47
47
+
"description": "AT-URI of the post"
48
48
+
},
49
49
+
"community": {
50
50
+
"type": "object",
51
51
+
"required": ["uri", "name"],
52
52
+
"properties": {
53
53
+
"uri": {
54
54
+
"type": "string",
55
55
+
"format": "at-uri",
56
56
+
"description": "AT-URI of the community"
57
57
+
},
58
58
+
"name": {
59
59
+
"type": "string",
60
60
+
"description": "Display name of the community"
61
61
+
},
62
62
+
"handle": {
63
63
+
"type": "string",
64
64
+
"description": "Handle of the community"
65
65
+
}
66
66
+
}
67
67
+
},
68
68
+
"author": {
69
69
+
"type": "object",
70
70
+
"required": ["did", "handle"],
71
71
+
"properties": {
72
72
+
"did": {
73
73
+
"type": "string",
74
74
+
"format": "did"
75
75
+
},
76
76
+
"handle": {
77
77
+
"type": "string"
78
78
+
},
79
79
+
"displayName": {
80
80
+
"type": "string"
81
81
+
},
82
82
+
"avatar": {
83
83
+
"type": "string",
84
84
+
"format": "uri"
85
85
+
}
86
86
+
}
87
87
+
},
88
88
+
"isOriginal": {
89
89
+
"type": "boolean",
90
90
+
"description": "Whether this is the original post in the chain"
91
91
+
},
92
92
+
"createdAt": {
93
93
+
"type": "string",
94
94
+
"format": "datetime"
95
95
+
}
96
96
+
}
97
97
+
}
98
98
+
}
99
99
+
}
+13
internal/atproto/lexicon/social/coves/post/image.json
···
73
73
"type": "ref",
74
74
"ref": "social.coves.actor.profile#geoLocation"
75
75
},
76
76
+
"crosspostOf": {
77
77
+
"type": "string",
78
78
+
"format": "at-uri",
79
79
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
80
80
+
},
81
81
+
"crosspostChain": {
82
82
+
"type": "array",
83
83
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
84
84
+
"items": {
85
85
+
"type": "string",
86
86
+
"format": "at-uri"
87
87
+
}
88
88
+
},
76
89
"createdAt": {
77
90
"type": "string",
78
91
"format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/microblog.json
···
119
119
"maxLength": 10,
120
120
"description": "Language code (e.g., 'en', 'es', 'fr')"
121
121
},
122
122
+
"crosspostOf": {
123
123
+
"type": "string",
124
124
+
"format": "at-uri",
125
125
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
126
126
+
},
127
127
+
"crosspostChain": {
128
128
+
"type": "array",
129
129
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
130
130
+
"items": {
131
131
+
"type": "string",
132
132
+
"format": "at-uri"
133
133
+
}
134
134
+
},
122
135
"createdAt": {
123
136
"type": "string",
124
137
"format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/text.json
···
74
74
"social.coves.embed.post"
75
75
]
76
76
},
77
77
+
"crosspostOf": {
78
78
+
"type": "string",
79
79
+
"format": "at-uri",
80
80
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
81
81
+
},
82
82
+
"crosspostChain": {
83
83
+
"type": "array",
84
84
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
85
85
+
"items": {
86
86
+
"type": "string",
87
87
+
"format": "at-uri"
88
88
+
}
89
89
+
},
77
90
"createdAt": {
78
91
"type": "string",
79
92
"format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/video.json
···
72
72
"type": "ref",
73
73
"ref": "social.coves.actor.profile#geoLocation"
74
74
},
75
75
+
"crosspostOf": {
76
76
+
"type": "string",
77
77
+
"format": "at-uri",
78
78
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
79
79
+
},
80
80
+
"crosspostChain": {
81
81
+
"type": "array",
82
82
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
83
83
+
"items": {
84
84
+
"type": "string",
85
85
+
"format": "at-uri"
86
86
+
}
87
87
+
},
75
88
"createdAt": {
76
89
"type": "string",
77
90
"format": "datetime"