[READ ONLY MIRROR] Spark Social AppView Server github.com/sprksocial/server
atproto deno hono lexicon
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

add labeler plugin and codegen

+5 -24
-1
api/so/sprk/actor/getPreferences.ts
··· 65 65 hideReplies: pref.hideReplies, 66 66 hideRepliesByUnfollowed: pref.hideRepliesByUnfollowed, 67 67 hideRepliesByLikeCount: pref.hideRepliesByLikeCount, 68 - hideRepliesByLookCount: pref.hideRepliesByLookCount, 69 68 hideReposts: pref.hideReposts, 70 69 hideQuotePosts: pref.hideQuotePosts, 71 70 });
-1
api/so/sprk/actor/putPreferences.ts
··· 66 66 hideReplies: p.hideReplies, 67 67 hideRepliesByUnfollowed: p.hideRepliesByUnfollowed, 68 68 hideRepliesByLikeCount: p.hideRepliesByLikeCount, 69 - hideRepliesByLookCount: p.hideRepliesByLookCount, 70 69 hideReposts: p.hideReposts, 71 70 hideQuotePosts: p.hideQuotePosts, 72 71 });
-1
data-plane/db/models.ts
··· 525 525 hideReplies?: boolean; 526 526 hideRepliesByUnfollowed: boolean; 527 527 hideRepliesByLikeCount?: number; 528 - hideRepliesByLookCount?: number; 529 528 hideReposts?: boolean; 530 529 hideQuotePosts?: boolean; 531 530 }>;
+4
data-plane/indexing/index.ts
··· 25 25 import * as Repost from "./plugins/repost.ts"; 26 26 import * as Story from "./plugins/story.ts"; 27 27 import * as Audio from "./plugins/audio.ts"; 28 + import * as Labeler from "./plugins/labeler.ts"; 28 29 import { RecordProcessor } from "./processor.ts"; 29 30 import { getLogger, Logger } from "@logtape/logtape"; 30 31 import { ServerConfig } from "../../config.ts"; ··· 41 42 generator: Generator.PluginType; 42 43 story: Story.PluginType; 43 44 audio: Audio.PluginType; 45 + labeler: Labeler.PluginType; 44 46 }; 45 47 logger: Logger; 46 48 ··· 62 64 generator: Generator.makePlugin(this.db, this.background), 63 65 story: Story.makePlugin(this.db, this.background), 64 66 audio: Audio.makePlugin(this.db, this.background), 67 + labeler: Labeler.makePlugin(this.db, this.background), 65 68 }; 66 69 } 67 70 ··· 308 311 await this.db.models.Block.deleteMany({ authorDid: did }); 309 312 await this.db.models.Post.deleteMany({ authorDid: did }); 310 313 await this.db.models.Reply.deleteMany({ authorDid: did }); 314 + await this.db.models.Labeler.deleteMany({ authorDid: did }); 311 315 } 312 316 } 313 317
-6
lex/lexicons.ts
··· 19981 19981 "description": 19982 19982 "Hide replies in the feed if they do not have this number of likes.", 19983 19983 }, 19984 - "hideRepliesByLookCount": { 19985 - "type": "integer", 19986 - "description": 19987 - "Hide replies in the feed if they do not have this number of looks.", 19988 - }, 19989 19984 "hideReposts": { 19990 19985 "type": "boolean", 19991 19986 "description": "Hide reposts in the feed.", ··· 20006 20001 "oldest", 20007 20002 "newest", 20008 20003 "most-likes", 20009 - "most-looks", 20010 20004 "random", 20011 20005 "hotness", 20012 20006 ],
-3
lex/types/so/sprk/actor/defs.ts
··· 259 259 hideRepliesByUnfollowed: boolean; 260 260 /** Hide replies in the feed if they do not have this number of likes. */ 261 261 hideRepliesByLikeCount?: number; 262 - /** Hide replies in the feed if they do not have this number of looks. */ 263 - hideRepliesByLookCount?: number; 264 262 /** Hide reposts in the feed. */ 265 263 hideReposts?: boolean; 266 264 /** Hide quote posts in the feed. */ ··· 284 282 | "oldest" 285 283 | "newest" 286 284 | "most-likes" 287 - | "most-looks" 288 285 | "random" 289 286 | "hotness" 290 287 | (string & globalThis.Record<PropertyKey, never>);
+1 -12
lexicons/so/sprk/actor/defs.json
··· 257 257 "type": "integer", 258 258 "description": "Hide replies in the feed if they do not have this number of likes." 259 259 }, 260 - "hideRepliesByLookCount": { 261 - "type": "integer", 262 - "description": "Hide replies in the feed if they do not have this number of looks." 263 - }, 264 260 "hideReposts": { 265 261 "type": "boolean", 266 262 "description": "Hide reposts in the feed." ··· 277 273 "sort": { 278 274 "type": "string", 279 275 "description": "Sorting mode for threads.", 280 - "knownValues": [ 281 - "oldest", 282 - "newest", 283 - "most-likes", 284 - "most-looks", 285 - "random", 286 - "hotness" 287 - ] 276 + "knownValues": ["oldest", "newest", "most-likes", "random", "hotness"] 288 277 } 289 278 } 290 279 },