A community based topic aggregation platform built on atproto

Adding crosspost logic to lexicon

+2 -7
internal/atproto/lexicon/social/coves/actor/membership.json
···
"defs": {
"main": {
"type": "record",
-
"description": "Membership in a community (has reputation)",
"key": "tid",
"record": {
"type": "object",
···
"default": 0,
"description": "Reputation score within the community"
},
-
"subscribedAt": {
-
"type": "string",
-
"format": "datetime",
-
"description": "When the user subscribed to a community"
-
},
"createdAt": {
"type": "string",
"format": "datetime",
-
"description": "When the user was created"
},
"endedAt": {
"type": "string",
···
"defs": {
"main": {
"type": "record",
+
"description": "Membership in a community",
"key": "tid",
"record": {
"type": "object",
···
"default": 0,
"description": "Reputation score within the community"
},
"createdAt": {
"type": "string",
"format": "datetime",
+
"description": "When the user's membership started"
},
"endedAt": {
"type": "string",
+2 -1
internal/atproto/lexicon/social/coves/actor/subscription.json
···
},
"createdAt": {
"type": "string",
-
"format": "datetime"
},
"endedAt": {
"type": "string",
···
},
"createdAt": {
"type": "string",
+
"format": "datetime",
+
"description": "When the subscription started"
},
"endedAt": {
"type": "string",
+43 -8
internal/atproto/lexicon/social/coves/community/rules.json
···
"type": "object",
"description": "Allowed post types in the community",
"properties": {
-
"textOnly": {
"type": "boolean",
-
"default": false,
-
"description": "Restrict to text posts only"
},
"allowVideo": {
"type": "boolean",
-
"default": true
},
"allowImage": {
"type": "boolean",
-
"default": true
},
"allowArticle": {
"type": "boolean",
-
"default": true
}
}
},
···
"tagThreshold": {
"type": "integer",
"minimum": 1,
-
"default": 5,
"description": "Number of tags needed to trigger action"
},
"tribunalThreshold": {
"type": "integer",
"minimum": 1,
-
"default": 3,
"description": "Number of tags to trigger tribunal review"
},
"jurySize": {
···
"minimum": 9,
"default": 9,
"description": "Number of jurors for tribunal"
}
}
}
···
"type": "object",
"description": "Allowed post types in the community",
"properties": {
+
"allowText": {
"type": "boolean",
+
"default": true,
+
"description": "Allow text posts"
},
"allowVideo": {
"type": "boolean",
+
"default": true,
+
"description": "Allow video posts"
},
"allowImage": {
"type": "boolean",
+
"default": true,
+
"description": "Allow image posts"
},
"allowArticle": {
"type": "boolean",
+
"default": true,
+
"description": "Allow Article posts"
}
}
},
···
"tagThreshold": {
"type": "integer",
"minimum": 1,
+
"default": 15,
"description": "Number of tags needed to trigger action"
},
"tribunalThreshold": {
"type": "integer",
"minimum": 1,
+
"default": 50,
"description": "Number of tags to trigger tribunal review"
},
"jurySize": {
···
"minimum": 9,
"default": 9,
"description": "Number of jurors for tribunal"
+
}
+
}
+
},
+
"rule": {
+
"type": "object",
+
"description": "A text-based community rule for display purposes",
+
"required": ["title", "description", "createdAt", "isActive"],
+
"properties": {
+
"title": {
+
"type": "string",
+
"maxLength": 256,
+
"description": "Short rule title (e.g., 'No Editorialized Titles')"
+
},
+
"description": {
+
"type": "string",
+
"maxLength": 2000,
+
"description": "Detailed explanation of the rule"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the rule was created"
+
},
+
"isActive": {
+
"type": "boolean",
+
"default": true,
+
"description": "Whether the rule is currently active"
+
},
+
"disabledAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the rule was disabled (optional)"
}
}
}
+13
internal/atproto/lexicon/social/coves/post/article.json
···
"type": "ref",
"ref": "social.coves.actor.profile#geoLocation"
},
"createdAt": {
"type": "string",
"format": "datetime"
···
"type": "ref",
"ref": "social.coves.actor.profile#geoLocation"
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
"createdAt": {
"type": "string",
"format": "datetime"
+39
internal/atproto/lexicon/social/coves/post/crosspost.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.crosspost",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A record tracking crosspost relationships between posts",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["originalPost", "crosspostOf", "createdAt"],
+
"properties": {
+
"originalPost": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the original post in the crosspost chain"
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the immediate parent this is a crosspost of"
+
},
+
"allCrossposts": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+99
internal/atproto/lexicon/social/coves/post/getCrosspostChain.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.getCrosspostChain",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Get all crossposts in a crosspost chain for a given post",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["uri"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of any post in the crosspost chain"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["crossposts"],
+
"properties": {
+
"crossposts": {
+
"type": "array",
+
"description": "All posts in the crosspost chain",
+
"items": {
+
"type": "ref",
+
"ref": "#crosspostView"
+
}
+
}
+
}
+
}
+
}
+
},
+
"crosspostView": {
+
"type": "object",
+
"required": ["uri", "community", "author", "createdAt"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post"
+
},
+
"community": {
+
"type": "object",
+
"required": ["uri", "name"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"name": {
+
"type": "string",
+
"description": "Display name of the community"
+
},
+
"handle": {
+
"type": "string",
+
"description": "Handle of the community"
+
}
+
}
+
},
+
"author": {
+
"type": "object",
+
"required": ["did", "handle"],
+
"properties": {
+
"did": {
+
"type": "string",
+
"format": "did"
+
},
+
"handle": {
+
"type": "string"
+
},
+
"displayName": {
+
"type": "string"
+
},
+
"avatar": {
+
"type": "string",
+
"format": "uri"
+
}
+
}
+
},
+
"isOriginal": {
+
"type": "boolean",
+
"description": "Whether this is the original post in the chain"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+13
internal/atproto/lexicon/social/coves/post/image.json
···
"type": "ref",
"ref": "social.coves.actor.profile#geoLocation"
},
"createdAt": {
"type": "string",
"format": "datetime"
···
"type": "ref",
"ref": "social.coves.actor.profile#geoLocation"
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
"createdAt": {
"type": "string",
"format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/microblog.json
···
"maxLength": 10,
"description": "Language code (e.g., 'en', 'es', 'fr')"
},
"createdAt": {
"type": "string",
"format": "datetime"
···
"maxLength": 10,
"description": "Language code (e.g., 'en', 'es', 'fr')"
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
"createdAt": {
"type": "string",
"format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/text.json
···
"social.coves.embed.post"
]
},
"createdAt": {
"type": "string",
"format": "datetime"
···
"social.coves.embed.post"
]
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
"createdAt": {
"type": "string",
"format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/video.json
···
"type": "ref",
"ref": "social.coves.actor.profile#geoLocation"
},
"createdAt": {
"type": "string",
"format": "datetime"
···
"type": "ref",
"ref": "social.coves.actor.profile#geoLocation"
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
"createdAt": {
"type": "string",
"format": "datetime"