-
Notifications
You must be signed in to change notification settings - Fork 0
Fix conversation title #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Slashek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not invoke GraphQL from partials
| assign other_participants_ids = participants_ids | subtract_array: current_participants_ids | ||
| assign from_profile = other_participants_ids | first | ||
| if from_profile | ||
| graphql from_profile = 'modules/profile/profiles/search', id: from_profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not invoke GraphQL from partials - all data should be fetched in the controller (Page)
| render 'modules/common-styling/user/avatar', size: 's', name: name, imageSrc: from_profile.avatar.photo.versions.sm | ||
| endif | ||
| print name | raw_escape_string | ||
| else # conversation was just initiated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid this big if statement with a lot of duplication, can we just fetch and prepare data in Page?
|
@Slashek Thanks for your input, should be much better now. |
| render 'modules/common-styling/user/avatar', size: 's', name: name, imageSrc: other_participant.avatar.photo.versions.sm | ||
| render 'modules/common-styling/user/avatar', size: 's', name: name, imageSrc: from_profile.avatar.photo.versions.sm | ||
| endif | ||
| print name | raw_escape_string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just use {{ }} to ensure no XSS attacks etc? I'm not sure if raw_escape_string is enough
|
thx @lk316 , one last comment |
|
@Slashek fixed |
3aa5d31 to
24439f1
Compare
https://platformos.slack.com/archives/C07910NASF3/p1750960683884329?thread_ts=1737579857.091099&cid=C07910NASF3
https://platformos.slack.com/archives/C04QLE0UY2U/p1752003727986169