Skip to content

Commit ab7ea65

Browse files
committed
update channel
1 parent b601d80 commit ab7ea65

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

apps/mobile/src/initialize/messaging.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { FirebaseMessagingTypes } from "@react-native-firebase/messaging"
22
import messaging from "@react-native-firebase/messaging"
33
import { useEffect } from "react"
4+
import { Platform } from "react-native"
45

56
import { apiClient } from "../lib/api-fetch"
67
import { kv } from "../lib/kv"
@@ -20,7 +21,7 @@ async function saveMessagingToken() {
2021
await apiClient.messaging.$post({
2122
json: {
2223
token,
23-
channel: "mobile",
24+
channel: Platform.OS,
2425
},
2526
})
2627
kv.set(FIREBASE_MESSAGING_TOKEN_STORAGE_KEY, token)

packages/shared/src/hono.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4604,15 +4604,15 @@ declare const messagingOpenAPISchema: z.ZodObject<z.objectUtil.extendShape<Omit<
46044604
token: z.ZodString;
46054605
channel: z.ZodString;
46064606
}, "channel">, {
4607-
channel: z.ZodEnum<["desktop", "mobile"]>;
4607+
channel: z.ZodEnum<["macos", "windows", "linux", "ios", "android", "web", "desktop"]>;
46084608
}>, "strip", z.ZodTypeAny, {
46094609
userId: string | null;
46104610
token: string;
4611-
channel: "desktop" | "mobile";
4611+
channel: "macos" | "windows" | "linux" | "ios" | "android" | "web" | "desktop";
46124612
}, {
46134613
userId: string | null;
46144614
token: string;
4615-
channel: "desktop" | "mobile";
4615+
channel: "macos" | "windows" | "linux" | "ios" | "android" | "web" | "desktop";
46164616
}>;
46174617
declare const messagingRelations: drizzle_orm.Relations<"messaging", {
46184618
users: drizzle_orm.One<"user", false>;
@@ -17391,7 +17391,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
1739117391
input: {
1739217392
json: {
1739317393
token: string;
17394-
channel: "desktop" | "mobile";
17394+
channel: "macos" | "windows" | "linux" | "ios" | "android" | "web" | "desktop";
1739517395
};
1739617396
};
1739717397
output: {

0 commit comments

Comments
 (0)