Moderator
Yes, but I recommend handling that with a funcion anyways
Votes
0
Replies
24
Participants
Unknown
Messages
25
Moderator
Yes, but I recommend handling that with a funcion anyways
Rank 3: Container
do u know a tutorial or an example for that with appwrite ? Because ive no idea how to make communicate firebase and appwrite especially to target specific user for specific notification
Moderator
Here you have an example: https://github.com/open-runtimes/examples/tree/main/dart/send_push_notification
Just send a request to firebase to send the notification. No needed integrating anything with Appwrite
Rank 3: Container
But if for example in the user setting there a notification panel where user can disable in-app notification, we have to make communicate user pref (in appwrite) with firebase right ?
Moderator
You can ommit fcm tokens
Rank 3: Container
@Guille im trying novu with nextjs and novu in cloud, but I got this error in console in my NextJS app :
Rank 3: Container
My novu.tsx look like :
import { NovuProvider, PopoverNotificationCenter, NotificationBell } from "@novu/notification-center"
export default function Novu( { userId } : { userId: string }) {
console.log(userId)
return (
<NovuProvider subscriberId={userId} applicationIdentifier={'on-boarding-notification'}>
<PopoverNotificationCenter colorScheme={'dark'}>
{({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
</PopoverNotificationCenter>
</NovuProvider>
)
}
Rank 3: Container
that weird everything look correct
Moderator
did you set API key?
Rank 3: Container
mhh my mistake is because I have to push to production (in Novu). And in NextJS i dont need API KEY right ?
Rank 3: Container
because im gonna trigger notification from appwrite function
Moderator
If you are using cloud, you should set your api key
Rank 3: Container
its working without :/
Rank 3: Container
api key is only for the trigger right ?
Moderator
I'm not sure, but if it's working you shouldn't be worried
Rank 3: Container
btw how do u add novu inside Appwrite function (NodeJS) ? just with that ?
import { Novu } from '@novu/node';
const novu = new Novu(req.variables['APPWRITE_FUNCTION_NOVU_API_KEY']);
Rank 3: Container
well i guess not
Rank 3: Container
ive try require but not working too
Rank 3: Container
well I guess we have to install @novu/node inside Appwrite instance
Rank 3: Container
Im dumb just have to add inside package.son (from the appwrite function) : "@novu/node": "^0.17.1"
Moderator
Yes, you have to add your dependencies in your clud function
Rank 3: Container
that work so well
Rank 3: Container
now I have to understand how make a custom notification center
Rank 3: Container
Do u know if there is a way to translate notification ? The only way for me is to give inside payload the entire text directly and have no text directly in novu workflows
Moderator
What I have read, there is not way to translate notifications currently, but there is already in the roadmap