-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix(@desktop/chat): handle invalid tenor gif link #9084
Conversation
@jrainville adding you as you are in the context of the problem. That's the ad-hoc fix I was speaking about (which I do not like to be honest). Unfortunately, there is one big con - flickering. Will this work for us? In another case we need to do some verification on status-go side |
b5579ea
to
a35fc81
Compare
Jenkins Builds
|
Not a big fan of adding workarounds and more JS/imperative code here... :/ |
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.
I don't mind the quick fix because it's a very low priority bug, but if people are not happy with that fix, I say let's just move the bug to the ice box. That issue doesn't deserve more time from us for now.
@@ -48,8 +48,18 @@ Column { | |||
|
|||
property bool loadingFailed: false | |||
|
|||
property bool unfurle: true |
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.
unfurle is not a valid word. Do you mean the verb "unfurl" or the adjective "unfurled"?
Is it complicated to do it in status-go? |
After discussing, closing this MR, as we have a task to refactor ui/imports/shared/views/chat/LinksMessageView.qml component and move logic to status_go (#9101) |
Motivated by: status-im/status-desktop#9084 While we don't request preview data from Tenor because the url itself will contain the GIF image, we still need to validate the url in the preview request. This is done using a HEAD request where we expect the response status code to be 200 OK. At the same time we will add the content type to the preview response.
…3169) Motivated by: status-im/status-desktop#9084 While we don't request preview data from Tenor because the url itself will contain the GIF image, we still need to validate the url in the preview request. This is done using a HEAD request where we expect the response status code to be 200 OK. At the same time we will add the content type to the preview response.
What does the PR do
The problem is that if you add an invalid tenor link, the tenor returns you 43 bytes gif image
Unfortunately, we can't understand if the gif provided is incorrect until we load it in Loader.
This is an ad-hoc fix which was communicated at the team meeting. In normal, verification should be done on the status-go side.
Fixes: #8560
Affected areas
Gif / Images animation
Screenshot of functionality (including design for comparison)
Screen.Recording.2023-01-12.at.16.13.16.mov