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
@jainpawan21 please help
Anyone ?
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.
Ok I got it
Can you please tell me how can I test it locally ?
You can run in local machine
and use variable in avatar field
and enable avatar option and use {{avatarUrl}} variable
send some in-app messages
send valid avatar url in payload and checkout if received in-app notification has that avatar
Thanks a lot for this. I will give it a go
@jainpawan21 I am getting this error while running
pnpm start:api
@.rohitsaini, you just advanced to level 2!
which branch you are using?'
can you try this
npm run start:api
?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 JainI 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...
@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
And where can I check those ?
apps/worker/src/app/workflow/usecases/send-message/send-message-in-app.usecase.ts
Thank you very much for this
@Pawan Jain Sir, is that it? Or do I have to change something else ?
I am also getting the avatar in notifications now
@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?
Ok sure
I added {{avatarUrl}} in profile url... and passed the actual url as avatarUrl in payload
Ohh Great
This is the required behaviour
Ok
I am creating the PR for the same.
https://github.com/novuhq/novu/pull/4204
@Rohit Saini, you just advanced to level 3!
Thanks Rohit 🙌🏻
We will review the PR
Thanks for help me out Pawan Sir
Hi Sir @Pawan Jain
Can you please look into this if you have some time
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 Can you please address pablo's comment?
this should work only with avatar url variables
Means, when a uses enters a variable in that url that only I have to parse it ?
yes
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 😄
@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...
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
Has this been dropped? Doesn't seem to be working
@Dauntless, you just advanced to level 3!