mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 18:22:53 +00:00
fix: Fix line sticker URL to prevent certain images from failing to d… (#10416)
This commit fixes the issue with Line stickers URLs to prevent certain images from failing to display. The problem was due to the use of incorrect URLs. The original URLs pointed to the `iphone` variant, which failed to load properly in some cases. The fix updates the URLs to use the `android` variant, ensuring all images are displayed correctly. ### Example: - Original (failing URL): `https://stickershop.line-scdn.net/stickershop/v1/sticker/17/iphone/sticker.png` - Fixed (working URL): `https://stickershop.line-scdn.net/stickershop/v1/sticker/17/android/sticker.png` ## How Has This Been Tested? 1. Verified the updated URLs by loading multiple Line sticker images to ensure they display correctly. 2. Tested in both local and production-like environments to confirm the fix resolves the issue. 3. Reviewed logs to ensure no additional errors are generated related to Line sticker URLs.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
class Line::IncomingMessageService
|
||||
include ::FileTypeHelper
|
||||
pattr_initialize [:inbox!, :params!]
|
||||
LINE_STICKER_IMAGE_URL = 'https://stickershop.line-scdn.net/stickershop/v1/sticker/%s/iphone/sticker.png'.freeze
|
||||
LINE_STICKER_IMAGE_URL = 'https://stickershop.line-scdn.net/stickershop/v1/sticker/%s/android/sticker.png'.freeze
|
||||
|
||||
def perform
|
||||
# probably test events
|
||||
|
||||
@@ -178,7 +178,7 @@ describe Line::IncomingMessageService do
|
||||
described_class.new(inbox: line_channel.inbox, params: sticker_params).perform
|
||||
expect(line_channel.inbox.conversations).not_to eq(0)
|
||||
expect(Contact.all.first.name).to eq('LINE Test')
|
||||
expect(line_channel.inbox.messages.first.content).to eq('')
|
||||
expect(line_channel.inbox.messages.first.content).to eq('')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user