korayaggul
korayaggul
NNovu
Created by korayaggul on 2/28/2024 in #💬│support
How to use onesignal push notification for novu ?
I can map Novu IDs differently with OneSignal, it does not match automatically.
13 replies
NNovu
Created by korayaggul on 2/28/2024 in #💬│support
How to use onesignal push notification for novu ?
@Pawan Jain
13 replies
NNovu
Created by korayaggul on 2/28/2024 in #💬│support
How to use onesignal push notification for novu ?
No description
13 replies
NNovu
Created by korayaggul on 2/28/2024 in #💬│support
How to use onesignal push notification for novu ?
65d248cae035efad38c5d6e9
13 replies
NNovu
Created by korayaggul on 2/28/2024 in #💬│support
How to use onesignal push notification for novu ?
I updated the deviceTokens section
const res = await novu.subscribers.get(userProfile.id.toString());
console.log("zxcresponse",res.data.data.channels[0].credentials.deviceTokens)
await novu.subscribers.setCredentials(res.data.data.subscriberId, PushProviderIdEnum.OneSignal, {
// Your user's unique 'player_id' from OneSignal
deviceTokens: res.data.data.channels[0].credentials.deviceTokens,
});
const res = await novu.subscribers.get(userProfile.id.toString());
console.log("zxcresponse",res.data.data.channels[0].credentials.deviceTokens)
await novu.subscribers.setCredentials(res.data.data.subscriberId, PushProviderIdEnum.OneSignal, {
// Your user's unique 'player_id' from OneSignal
deviceTokens: res.data.data.channels[0].credentials.deviceTokens,
});
13 replies
NNovu
Created by korayaggul on 2/22/2024 in #💬│support
Socket Questions
thank you bro 🙏 @Pawan Jain
7 replies
NNovu
Created by korayaggul on 2/22/2024 in #💬│support
Socket Questions
No description
7 replies
NNovu
Created by korayaggul on 2/22/2024 in #💬│support
Socket Questions
In general, I asked about unseen count and sending seen information when someone sees it, but very little can be done with socket, so I decided to use API ends, I solved my problem, thank you. @Pawan Jain
7 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
No, I asked just to be sure, it works, thank you
20 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
thank you ❤️
20 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
import { useSocket } from "@novu/notification-center";
import React, { useEffect, useState } from "react";
import { BiBell } from "react-icons/bi";

const Notification = ({ unseenCount }: any) => {
const { socket } = useSocket();

useEffect(() => {
if (socket) {
socket.on("notification_received", (data) => {
console.log(data);
console.log("zxcunseenCount",data)

});
}

return () => {
if (socket) {
socket.off("notification_received");
}
};
}, [socket]);
return (
<div>
<div style={{color:"white"}}>{unseenCount}</div>
</div>
);
};


export default Notification;
import { useSocket } from "@novu/notification-center";
import React, { useEffect, useState } from "react";
import { BiBell } from "react-icons/bi";

const Notification = ({ unseenCount }: any) => {
const { socket } = useSocket();

useEffect(() => {
if (socket) {
socket.on("notification_received", (data) => {
console.log(data);
console.log("zxcunseenCount",data)

});
}

return () => {
if (socket) {
socket.off("notification_received");
}
};
}, [socket]);
return (
<div>
<div style={{color:"white"}}>{unseenCount}</div>
</div>
);
};


export default Notification;
is this correct ?
20 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
I want to write it in a special way and it will appear directly as a pop up, but I need the content of the notification I receive.
20 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
ahh thank you, So, how can I see the content of the message I received here?
<NovuProvider
subscriberId={user.id.toString()}
applicationIdentifier={"appId"}
initialFetchingStrategy={{
fetchNotifications: true,
}}
>
<PopoverNotificationCenter
colorScheme="dark"
>
{({ unseenCount }) => <Notification unseenCount={unseenCount}/>}
</PopoverNotificationCenter>
{outlet}
</NovuProvider>
<NovuProvider
subscriberId={user.id.toString()}
applicationIdentifier={"appId"}
initialFetchingStrategy={{
fetchNotifications: true,
}}
>
<PopoverNotificationCenter
colorScheme="dark"
>
{({ unseenCount }) => <Notification unseenCount={unseenCount}/>}
</PopoverNotificationCenter>
{outlet}
</NovuProvider>
Is there anything else besides unseenCount?
20 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
No description
20 replies