N
Novu15mo ago
Rohit Saini

Need some help with an issue guidance

I am going to work on this issue https://github.com/novuhq/novu/issues/4081 I need some help to navigate through the codebase and help me find the suitable place to fix this issue.
35 Replies
Rohit Saini
Rohit SainiOP15mo ago
@jainpawan21 please help Anyone ?
Pawan Jain
Pawan Jain15mo ago
Hi @.rohitsaini This is the high level overview how variables work. So we have few variables as system variables and few variables as payload (step) variables This above variable will fall into step variable category. So in backend side you will have to check if this variable is compiled and value is picked correctly from payload.
Rohit Saini
Rohit SainiOP15mo ago
Ok I got it Can you please tell me how can I test it locally ?
Pawan Jain
Pawan Jain15mo ago
You can run in local machine and use variable in avatar field
Pawan Jain
Pawan Jain15mo ago
and enable avatar option and use {{avatarUrl}} variable
No description
Pawan Jain
Pawan Jain15mo ago
send some in-app messages send valid avatar url in payload and checkout if received in-app notification has that avatar
Rohit Saini
Rohit SainiOP15mo ago
Thanks a lot for this. I will give it a go
Rohit Saini
Rohit SainiOP15mo ago
@jainpawan21 I am getting this error while running pnpm start:api
No description
Novu_Bot
Novu_Bot15mo ago
@.rohitsaini, you just advanced to level 2!
Pawan Jain
Pawan Jain15mo ago
which branch you are using?' can you try this npm run start:api ?
Rohit Saini
Rohit SainiOP15mo ago
OK, I will give it a go @jainpawan21 Thanks for your input, I figured it out. The issue was with the redis not running. Hi sir @Pawan Jain
Rohit Saini
Rohit SainiOP15mo ago
I am working on this issue, and I almost got where I have to do the change. It must be where the queue for notifications is processed. The due the codebase being too large I am not able to find out where this queue is processing the notifications. Like I am not able to get which file is responsible for that. https://github.com/novuhq/novu/issues/4081
GitHub
[NV-2700] variables in avatar url field is not working · Issue #408...
What? Our in-app editor has avatar option, There are three ways for adding avatar User Avatar (novu will pick avatar from actor avatar URL) System Avatar Hard Coded Avatar URL Why? (Context) If any...
Pawan Jain
Pawan Jain15mo ago
@Rohit Saini I feel you don't need to check queue for this You just need to check pre compilation and post compilarion results If your post compilation result has avatarUrl value injected then good to go
Rohit Saini
Rohit SainiOP15mo ago
And where can I check those ?
Pawan Jain
Pawan Jain15mo ago
apps/worker/src/app/workflow/usecases/send-message/send-message-in-app.usecase.ts
Rohit Saini
Rohit SainiOP15mo ago
Thank you very much for this
Rohit Saini
Rohit SainiOP15mo ago
@Pawan Jain Sir, is that it? Or do I have to change something else ?
No description
Rohit Saini
Rohit SainiOP15mo ago
I am also getting the avatar in notifications now
No description
Pawan Jain
Pawan Jain15mo ago
@Rohit Saini Can you please share the PR? it will be easy for us to review 🙂 In this image, icons are from variable value or you hard coded avatar url value?
Rohit Saini
Rohit SainiOP15mo ago
Ok sure I added {{avatarUrl}} in profile url... and passed the actual url as avatarUrl in payload
Pawan Jain
Pawan Jain15mo ago
Ohh Great This is the required behaviour
Rohit Saini
Rohit SainiOP15mo ago
Ok I am creating the PR for the same. https://github.com/novuhq/novu/pull/4204
Novu_Bot
Novu_Bot15mo ago
@Rohit Saini, you just advanced to level 3!
Pawan Jain
Pawan Jain15mo ago
Thanks Rohit 🙌🏻 We will review the PR
Rohit Saini
Rohit SainiOP14mo ago
Thanks for help me out Pawan Sir Hi Sir @Pawan Jain Can you please look into this if you have some time
Rohit Saini
Rohit SainiOP14mo ago
GitHub
fix(avatar-url-variables): variables not working with avatar url by...
fix #4081 What change does this PR introduce? Compiling variables in avatar url that user provides Why was this change needed? Previously, the avatar URL was not working with variables Other inform...
Rohit Saini
Rohit SainiOP14mo ago
No description
Pawan Jain
Pawan Jain14mo ago
@Rohit Saini Can you please address pablo's comment? this should work only with avatar url variables
Rohit Saini
Rohit SainiOP14mo ago
Means, when a uses enters a variable in that url that only I have to parse it ?
Pawan Jain
Pawan Jain14mo ago
yes
Rohit Saini
Rohit SainiOP14mo ago
Okay, so is there any function available to check if a string contains a variable ? @Pawan Jain I have pushed the updated changes, please review and let me know if there are any changes https://github.com/novuhq/novu/pull/4204 Actually, I need to use this in one of my personal projects too 😄
Pawan Jain
Pawan Jain14mo ago
@Rohit Saini Can you please add e2e test for this? https://github.com/novuhq/novu/pull/4204#issuecomment-1748047194
GitHub
fix(avatar-url-variables): variables not working with avatar url by...
fix #4081 What change does this PR introduce? Compiling variables in avatar url that user provides Why was this change needed? Previously, the avatar URL was not working with variables Other inform...
Rohit Saini
Rohit SainiOP14mo ago
Ohhh okay, I will try. Can you please guide me on this, like are there any similar kind of test cases written ? Actually I have not written any test cases yet tbh
Dauntless
Dauntless6mo ago
Has this been dropped? Doesn't seem to be working
Novu_Bot
Novu_Bot6mo ago
@Dauntless, you just advanced to level 3!
Want results from more Discord servers?
Add your server