Skip to content

Commit

Permalink
Merge pull request #1985 from GetStream/khushal87/fix-url-preview
Browse files Browse the repository at this point in the history
fix: rendering the URL Preview for appropriate attachments in message list
  • Loading branch information
vanGalilea authored Feb 23, 2023
2 parents 29c6852 + e0928f3 commit 2469075
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 26 deletions.
8 changes: 4 additions & 4 deletions examples/ExpoMessaging/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6672,10 +6672,10 @@ stream-buffers@2.2.x:
version "0.0.0"
uid ""

stream-chat-react-native-core@5.11.1:
version "5.11.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.1.tgz#37d90772863c1a34da670176ebec0b72ecc43955"
integrity sha512-3hXgbq5Z8rBPkjZEesJwFXGfjfiKtTkv4SjcUUYwQn3sCT6Cvyq+UiyyAYwUwZ1YluVuL9SD5ZkM6qWTnVmaGw==
stream-chat-react-native-core@5.11.2:
version "5.11.2"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.2.tgz#fc136917f481e44151819820fe475b49c45b06e3"
integrity sha512-tWEBxstr27znQMuAhxNucBrk/WfCPLUAwmSodkVKKtwA+2Roo8dn/6FVYNLoq6TgGVKbGvtTs+ZOaUsAxFlnkQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand Down
4 changes: 2 additions & 2 deletions examples/SampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: a6454570f573a0f6f1d397e5a95c13e8e45d1700
FBReactNativeSpec: 09e8dfba44487e5dc4882a9f5318cde67549549c
Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
Expand All @@ -855,7 +855,7 @@ SPEC CHECKSUMS:
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: 4c19f031220c72464d460c9daa1fb5d1acce958e
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
Expand Down
8 changes: 4 additions & 4 deletions examples/SampleApp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7498,10 +7498,10 @@ stream-buffers@2.2.x:
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==

stream-chat-react-native-core@5.11.1:
version "5.11.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.1.tgz#37d90772863c1a34da670176ebec0b72ecc43955"
integrity sha512-3hXgbq5Z8rBPkjZEesJwFXGfjfiKtTkv4SjcUUYwQn3sCT6Cvyq+UiyyAYwUwZ1YluVuL9SD5ZkM6qWTnVmaGw==
stream-chat-react-native-core@5.11.2:
version "5.11.2"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.2.tgz#fc136917f481e44151819820fe475b49c45b06e3"
integrity sha512-tWEBxstr27znQMuAhxNucBrk/WfCPLUAwmSodkVKKtwA+2Roo8dn/6FVYNLoq6TgGVKbGvtTs+ZOaUsAxFlnkQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand Down
8 changes: 4 additions & 4 deletions examples/TypeScriptMessaging/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7106,10 +7106,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.11.1:
version "5.11.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.1.tgz#37d90772863c1a34da670176ebec0b72ecc43955"
integrity sha512-3hXgbq5Z8rBPkjZEesJwFXGfjfiKtTkv4SjcUUYwQn3sCT6Cvyq+UiyyAYwUwZ1YluVuL9SD5ZkM6qWTnVmaGw==
stream-chat-react-native-core@5.11.2:
version "5.11.2"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.2.tgz#fc136917f481e44151819820fe475b49c45b06e3"
integrity sha512-tWEBxstr27znQMuAhxNucBrk/WfCPLUAwmSodkVKKtwA+2Roo8dn/6FVYNLoq6TgGVKbGvtTs+ZOaUsAxFlnkQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand Down
8 changes: 4 additions & 4 deletions package/expo-package/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3005,10 +3005,10 @@ stream-buffers@2.2.x:
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==

stream-chat-react-native-core@5.11.1:
version "5.11.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.1.tgz#37d90772863c1a34da670176ebec0b72ecc43955"
integrity sha512-3hXgbq5Z8rBPkjZEesJwFXGfjfiKtTkv4SjcUUYwQn3sCT6Cvyq+UiyyAYwUwZ1YluVuL9SD5ZkM6qWTnVmaGw==
stream-chat-react-native-core@5.11.2:
version "5.11.2"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.2.tgz#fc136917f481e44151819820fe475b49c45b06e3"
integrity sha512-tWEBxstr27znQMuAhxNucBrk/WfCPLUAwmSodkVKKtwA+2Roo8dn/6FVYNLoq6TgGVKbGvtTs+ZOaUsAxFlnkQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand Down
8 changes: 4 additions & 4 deletions package/native-package/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4410,10 +4410,10 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.11.1:
version "5.11.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.1.tgz#37d90772863c1a34da670176ebec0b72ecc43955"
integrity sha512-3hXgbq5Z8rBPkjZEesJwFXGfjfiKtTkv4SjcUUYwQn3sCT6Cvyq+UiyyAYwUwZ1YluVuL9SD5ZkM6qWTnVmaGw==
stream-chat-react-native-core@5.11.2:
version "5.11.2"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.11.2.tgz#fc136917f481e44151819820fe475b49c45b06e3"
integrity sha512-tWEBxstr27znQMuAhxNucBrk/WfCPLUAwmSodkVKKtwA+2Roo8dn/6FVYNLoq6TgGVKbGvtTs+ZOaUsAxFlnkQ==
dependencies:
"@babel/runtime" "^7.12.5"
"@gorhom/bottom-sheet" "4.4.5"
Expand Down
5 changes: 1 addition & 4 deletions package/src/components/Attachment/Attachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ const AttachmentWithContext = <
return <Giphy attachment={attachment} giphyVersion={giphyVersion} />;
}

if (
(attachment.title_link || attachment.og_scrape_url) &&
(attachment.image_url || attachment.thumb_url)
) {
if (attachment.og_scrape_url || attachment.title_link) {
return <UrlPreview {...attachment} />;
}

Expand Down

0 comments on commit 2469075

Please sign in to comment.