Skip to content

Commit 8aa0b47

Browse files
committed
update channel for web and desktop
1 parent ab7ea65 commit 8aa0b47

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

apps/desktop/src/main/src/lib/user.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Credentials } from "@eneris/push-receiver/dist/types"
22
import type { UserModel } from "@follow/models"
33

4+
import { isLinux, isMacOS, isWindows } from "~/env"
45
import { logger } from "~/logger"
56

67
import { apiClient } from "./api-client"
@@ -30,7 +31,7 @@ export const updateNotificationsToken = async (newCredentials?: Credentials) =>
3031
await apiClient.messaging.$post({
3132
json: {
3233
token: credentials.fcm.token,
33-
channel: "desktop",
34+
channel: isMacOS ? "macos" : isWindows ? "windows" : isLinux ? "linux" : "desktop",
3435
},
3536
})
3637
} catch (error) {

apps/desktop/src/renderer/src/push-notification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function registerWebPushNotifications() {
3737
await apiClient.messaging.$post({
3838
json: {
3939
token,
40-
channel: "desktop",
40+
channel: "web",
4141
},
4242
})
4343

0 commit comments

Comments
 (0)