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

Configure Feed

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

fix(crossposts): rm crosspost reply notifs

+2 -73
+2 -73
data-plane/indexing/plugins/crosspost/reply.ts
··· 165 165 return null; 166 166 }; 167 167 168 - const notifsForInsert = (obj: IndexedReply) => { 169 - const notifs: Array<{ 170 - did: string; 171 - reason: string; 172 - author: string; 173 - recordUri: string; 174 - recordCid: string; 175 - sortAt: string; 176 - reasonSubject?: string; 177 - }> = []; 178 - const notified = new Set([obj.reply.authorDid]); 179 - const maybeNotify = (notif: { 180 - did: string; 181 - reason: string; 182 - author: string; 183 - recordUri: string; 184 - recordCid: string; 185 - sortAt: string; 186 - reasonSubject?: string; 187 - }) => { 188 - if (!notified.has(notif.did)) { 189 - notified.add(notif.did); 190 - notifs.push(notif); 191 - } 192 - }; 193 - for (const facet of obj.facets ?? []) { 194 - if (facet.type === "mention") { 195 - maybeNotify({ 196 - did: facet.value, 197 - reason: "mention", 198 - author: obj.reply.authorDid, 199 - recordUri: obj.reply.uri, 200 - recordCid: obj.reply.cid, 201 - sortAt: obj.reply.createdAt, 202 - }); 203 - } 204 - } 205 - 206 - for (const ancestor of obj.ancestors ?? []) { 207 - if (ancestor.uri === obj.reply.uri) continue; 208 - if (ancestor.height < REPLY_NOTIF_DEPTH) { 209 - const ancestorUri = new AtUri(ancestor.uri); 210 - maybeNotify({ 211 - did: ancestorUri.host, 212 - reason: "reply", 213 - reasonSubject: ancestorUri.toString(), 214 - author: obj.reply.authorDid, 215 - recordUri: obj.reply.uri, 216 - recordCid: obj.reply.cid, 217 - sortAt: obj.reply.createdAt, 218 - }); 219 - } 220 - } 221 - 222 - for (const descendent of obj.descendents ?? []) { 223 - for (const ancestor of obj.ancestors ?? []) { 224 - const totalHeight = descendent.depth + ancestor.height; 225 - if (totalHeight < REPLY_NOTIF_DEPTH) { 226 - const ancestorUri = new AtUri(ancestor.uri); 227 - maybeNotify({ 228 - did: ancestorUri.host, 229 - reason: "reply", 230 - reasonSubject: ancestorUri.toString(), 231 - author: descendent.creator, 232 - recordUri: descendent.uri, 233 - recordCid: descendent.cid, 234 - sortAt: descendent.sortAt, 235 - }); 236 - } 237 - } 238 - } 239 - 240 - return notifs; 168 + const notifsForInsert = (_obj: IndexedReply) => { 169 + return []; 241 170 }; 242 171 243 172 const deleteFn = async (