grain.social is a photo sharing platform built on atproto. grain.social
atproto photography appview
48
fork

Configure Feed

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

refactor: move server hooks into server/hooks/ directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+6 -6
+2 -2
server/on-commit-comment.ts server/hooks/on-commit-comment.ts
··· 1 1 import { defineHook } from "$hatk"; 2 - import { shouldPush } from "./helpers/notifPrefs.ts"; 3 - import { getUnseenCount } from "./helpers/unseenCount.ts"; 2 + import { shouldPush } from "../helpers/notifPrefs.ts"; 3 + import { getUnseenCount } from "../helpers/unseenCount.ts"; 4 4 5 5 export default defineHook("on-commit", { collections: ["social.grain.comment"] }, 6 6 async ({ action, record, repo, db, lookup, push }) => {
+2 -2
server/on-commit-favorite.ts server/hooks/on-commit-favorite.ts
··· 1 1 import { defineHook } from "$hatk"; 2 - import { shouldPush } from "./helpers/notifPrefs.ts"; 3 - import { getUnseenCount } from "./helpers/unseenCount.ts"; 2 + import { shouldPush } from "../helpers/notifPrefs.ts"; 3 + import { getUnseenCount } from "../helpers/unseenCount.ts"; 4 4 5 5 export default defineHook("on-commit", { collections: ["social.grain.favorite"] }, 6 6 async ({ action, record, repo, db, lookup, push }) => {
+2 -2
server/on-commit-follow.ts server/hooks/on-commit-follow.ts
··· 1 1 import { defineHook } from "$hatk"; 2 - import { shouldPush } from "./helpers/notifPrefs.ts"; 3 - import { getUnseenCount } from "./helpers/unseenCount.ts"; 2 + import { shouldPush } from "../helpers/notifPrefs.ts"; 3 + import { getUnseenCount } from "../helpers/unseenCount.ts"; 4 4 5 5 export default defineHook("on-commit", { collections: ["social.grain.graph.follow"] }, 6 6 async ({ action, record, repo, db, lookup, push }) => {
server/on-login.ts server/hooks/on-login.ts