File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { Credentials } from "@eneris/push-receiver/dist/types"
22import type { UserModel } from "@follow/models"
33
4+ import { isLinux , isMacOS , isWindows } from "~/env"
45import { logger } from "~/logger"
56
67import { 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 ) {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments