feat(mobile): notification (#3424)

* init messaging

* use expo-notifications plugin

* unread badge

* background fetch

* update

* skip for no user

* cache messaging token

* navigate to entry

* get entry without prefetch

* update channel

* update channel for web and desktop

* remove useless dep

* check user in task

* messaging as hook

* fix condition

* rename
This commit is contained in:
Stephen Zhou
2025-04-08 10:45:11 +08:00
committed by GitHub
parent 3bbe28086a
commit 16be7cd868
18 changed files with 361 additions and 13 deletions
+4 -4
View File
@@ -4604,15 +4604,15 @@ declare const messagingOpenAPISchema: z.ZodObject<z.objectUtil.extendShape<Omit<
token: z.ZodString;
channel: z.ZodString;
}, "channel">, {
channel: z.ZodEnum<["desktop", "mobile"]>;
channel: z.ZodEnum<["macos", "windows", "linux", "ios", "android", "web", "desktop"]>;
}>, "strip", z.ZodTypeAny, {
userId: string | null;
token: string;
channel: "desktop" | "mobile";
channel: "macos" | "windows" | "linux" | "ios" | "android" | "web" | "desktop";
}, {
userId: string | null;
token: string;
channel: "desktop" | "mobile";
channel: "macos" | "windows" | "linux" | "ios" | "android" | "web" | "desktop";
}>;
declare const messagingRelations: drizzle_orm.Relations<"messaging", {
users: drizzle_orm.One<"user", false>;
@@ -17391,7 +17391,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
input: {
json: {
token: string;
channel: "desktop" | "mobile";
channel: "macos" | "windows" | "linux" | "ios" | "android" | "web" | "desktop";
};
};
output: {