diff --git a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx index 143a05c5cc..06b186218e 100644 --- a/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx +++ b/docusaurus/docs/reactnative/common-content/core-components/channel-list/props/sort.mdx @@ -4,7 +4,7 @@ You can sort a query on [built-in](https://getstream.io/chat/docs/javascript/que #### Example ```tsx -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; ``` :::note diff --git a/docusaurus/docs/reactnative/core-components/channel_list.mdx b/docusaurus/docs/reactnative/core-components/channel_list.mdx index 92786a48f0..fb9aa82611 100644 --- a/docusaurus/docs/reactnative/core-components/channel_list.mdx +++ b/docusaurus/docs/reactnative/core-components/channel_list.mdx @@ -60,7 +60,7 @@ import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); const filters = { members: { $in: [ 'vishal', 'lucas', 'neil' ] } }; -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; const options = { limit: 20, messages_limit: 30 }; export const App = () => diff --git a/docusaurus/reactnative_versioned_docs/version-3.x.x/common-content/core-components/channel-list/props/sort.mdx b/docusaurus/reactnative_versioned_docs/version-3.x.x/common-content/core-components/channel-list/props/sort.mdx index 143a05c5cc..06b186218e 100644 --- a/docusaurus/reactnative_versioned_docs/version-3.x.x/common-content/core-components/channel-list/props/sort.mdx +++ b/docusaurus/reactnative_versioned_docs/version-3.x.x/common-content/core-components/channel-list/props/sort.mdx @@ -4,7 +4,7 @@ You can sort a query on [built-in](https://getstream.io/chat/docs/javascript/que #### Example ```tsx -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; ``` :::note diff --git a/docusaurus/reactnative_versioned_docs/version-3.x.x/core-components/channel_list.mdx b/docusaurus/reactnative_versioned_docs/version-3.x.x/core-components/channel_list.mdx index 262e7cbf0b..186d55d1fd 100644 --- a/docusaurus/reactnative_versioned_docs/version-3.x.x/core-components/channel_list.mdx +++ b/docusaurus/reactnative_versioned_docs/version-3.x.x/core-components/channel_list.mdx @@ -57,7 +57,7 @@ import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); const filters = { members: { $in: [ 'vishal', 'lucas', 'neil' ] } }; -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; const options = { limit: 20, messages_limit: 30 }; export const App = () => diff --git a/docusaurus/reactnative_versioned_docs/version-4.x.x/common-content/core-components/channel-list/props/sort.mdx b/docusaurus/reactnative_versioned_docs/version-4.x.x/common-content/core-components/channel-list/props/sort.mdx index 143a05c5cc..06b186218e 100644 --- a/docusaurus/reactnative_versioned_docs/version-4.x.x/common-content/core-components/channel-list/props/sort.mdx +++ b/docusaurus/reactnative_versioned_docs/version-4.x.x/common-content/core-components/channel-list/props/sort.mdx @@ -4,7 +4,7 @@ You can sort a query on [built-in](https://getstream.io/chat/docs/javascript/que #### Example ```tsx -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; ``` :::note diff --git a/docusaurus/reactnative_versioned_docs/version-4.x.x/core-components/channel_list.mdx b/docusaurus/reactnative_versioned_docs/version-4.x.x/core-components/channel_list.mdx index 5f525f11b8..628a61fb90 100644 --- a/docusaurus/reactnative_versioned_docs/version-4.x.x/core-components/channel_list.mdx +++ b/docusaurus/reactnative_versioned_docs/version-4.x.x/core-components/channel_list.mdx @@ -58,7 +58,7 @@ import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native'; const client = StreamChat.getInstance('api_key'); const filters = { members: { $in: [ 'vishal', 'lucas', 'neil' ] } }; -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; const options = { limit: 20, messages_limit: 30 }; export const App = () => diff --git a/examples/ExpoMessaging/app/index.tsx b/examples/ExpoMessaging/app/index.tsx index 1009a773a7..66f64105f7 100644 --- a/examples/ExpoMessaging/app/index.tsx +++ b/examples/ExpoMessaging/app/index.tsx @@ -11,7 +11,7 @@ const filters = { members: { $in: [user.id] }, type: 'messaging', }; -const sort: ChannelSort = { last_message_at: -1 }; +const sort: ChannelSort = { last_updated: -1 }; const options = { state: true, watch: true, diff --git a/examples/ExpoMessaging/yarn.lock b/examples/ExpoMessaging/yarn.lock index f61152a217..7aba513c44 100644 --- a/examples/ExpoMessaging/yarn.lock +++ b/examples/ExpoMessaging/yarn.lock @@ -2380,6 +2380,15 @@ axios@^0.22.0: dependencies: follow-redirects "^1.14.4" +axios@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102" + integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -3869,6 +3878,11 @@ follow-redirects@^1.14.4: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== + fontfaceobserver@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz#5fb392116e75d5024b7ec8e4f2ce92106d1488c8" @@ -6185,6 +6199,11 @@ prop-types@*, prop-types@^15.5.10, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -7103,10 +7122,10 @@ stream-buffers@2.2.x: version "0.0.0" uid "" -stream-chat-react-native-core@5.19.0: - version "5.19.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.0.tgz#8408f64c7d4eb97fc315e865b0759092e17c09ca" - integrity sha512-p/+Rdo18JIoBkt+BovFnNezh18DXq+/k6WClx1JPgjcJg35OkqXx/W47WLLWuurBw/NR/Il9orFj7JRO/Ebddg== +stream-chat-react-native-core@5.19.3: + version "5.19.3" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.3.tgz#6f99af372bce8414998d4cce13ce0855a1a20386" + integrity sha512-uOJC1tq9VqzaPdv5TL6PWbLar2mCGQ1nYKQ3tdcnQhL3T/3130oizoP0rh/3LB2HUqn19NcngfnzE2FBXTI++w== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.8" @@ -7120,16 +7139,16 @@ stream-chat-react-native-core@5.19.0: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "~8.12.2" + stream-chat "~8.13.1" "stream-chat-react-native-core@link:../../package": version "0.0.0" uid "" -stream-chat@~8.12.2: - version "8.12.4" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.12.4.tgz#3c2044ceb74b4be8bd06191963723d7d47014ec1" - integrity sha512-YaNuQNqiJcF82+VKAGNSV8wv0+Th73kHIV4Owiu2Bvhwqt7398Ertr+bxW4WXkBtwKoAeOZOc0oacrUKWQAuKQ== +stream-chat@~8.13.1: + version "8.13.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.13.1.tgz#9781a456487f376d7c9c98271a4f4c926a9e6cf8" + integrity sha512-k0tOmtlLsvVxpZ2EuR+Z/qQiyCHOIjACqwnBZnT1ERA1t3549U2vzkUE6l2tN2VGAgUP1tDl00FhZO5JrAkMKw== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" @@ -7141,6 +7160,21 @@ stream-chat@~8.12.2: jsonwebtoken "~9.0.0" ws "^7.4.4" +stream-chat@~8.14.0: + version "8.14.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.14.1.tgz#f6560c2aa2ce754928d41d6059c61d7cfe770e0a" + integrity sha512-7ersgzFLrUlnV5q09SLcJSEkKMEFNl3E7C5Pk48hzzKuY/eRt8+ojka7t17/cRtF84g3XSW0dSl7C/yB9J5ieQ== + dependencies: + "@babel/runtime" "^7.16.3" + "@types/jsonwebtoken" "~9.0.0" + "@types/ws" "^7.4.0" + axios "^1.6.0" + base64-js "^1.5.1" + form-data "^4.0.0" + isomorphic-ws "^4.0.1" + jsonwebtoken "~9.0.0" + ws "^7.4.4" + strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" diff --git a/examples/SampleApp/src/screens/ChannelListScreen.tsx b/examples/SampleApp/src/screens/ChannelListScreen.tsx index c75b13f50a..429b537933 100644 --- a/examples/SampleApp/src/screens/ChannelListScreen.tsx +++ b/examples/SampleApp/src/screens/ChannelListScreen.tsx @@ -51,7 +51,7 @@ const styles = StyleSheet.create({ const baseFilters = { type: 'messaging', }; -const sort: ChannelSort = { last_message_at: -1 }; +const sort: ChannelSort = { last_updated: -1 }; const options = { presence: true, state: true, diff --git a/examples/SampleApp/src/screens/SharedGroupsScreen.tsx b/examples/SampleApp/src/screens/SharedGroupsScreen.tsx index 851e020065..4ac34b9282 100644 --- a/examples/SampleApp/src/screens/SharedGroupsScreen.tsx +++ b/examples/SampleApp/src/screens/SharedGroupsScreen.tsx @@ -191,7 +191,7 @@ export const SharedGroupsScreen: React.FC = ({ }} Preview={CustomPreview} sort={{ - last_message_at: -1, + last_updated: -1, }} /> diff --git a/examples/SampleApp/yarn.lock b/examples/SampleApp/yarn.lock index 051663fe28..0b727630df 100644 --- a/examples/SampleApp/yarn.lock +++ b/examples/SampleApp/yarn.lock @@ -2948,6 +2948,15 @@ axios@^0.22.0: dependencies: follow-redirects "^1.14.4" +axios@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102" + integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -4366,6 +4375,11 @@ follow-redirects@^1.14.4: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -6653,6 +6667,11 @@ prop-types@*, prop-types@^15.5.10, prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + punycode@^2.1.0, punycode@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" @@ -7368,10 +7387,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.19.2: - version "5.19.2" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.2.tgz#4a60f639316122816fe749261af2ac54d7bf6395" - integrity sha512-WgNhZXbiNIn5NsXnVp34PDyVhlGWzYdMqOvXRZh4Gdz3uj3VDyn9mUbOJPNXIPntHCimyfnX5A4Ka8JTCBDMXg== +stream-chat-react-native-core@5.19.3: + version "5.19.3" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.3.tgz#6f99af372bce8414998d4cce13ce0855a1a20386" + integrity sha512-uOJC1tq9VqzaPdv5TL6PWbLar2mCGQ1nYKQ3tdcnQhL3T/3130oizoP0rh/3LB2HUqn19NcngfnzE2FBXTI++w== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.8" @@ -7410,6 +7429,21 @@ stream-chat@~8.13.1: jsonwebtoken "~9.0.0" ws "^7.4.4" +stream-chat@~8.14.0: + version "8.14.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.14.1.tgz#f6560c2aa2ce754928d41d6059c61d7cfe770e0a" + integrity sha512-7ersgzFLrUlnV5q09SLcJSEkKMEFNl3E7C5Pk48hzzKuY/eRt8+ojka7t17/cRtF84g3XSW0dSl7C/yB9J5ieQ== + dependencies: + "@babel/runtime" "^7.16.3" + "@types/jsonwebtoken" "~9.0.0" + "@types/ws" "^7.4.0" + axios "^1.6.0" + base64-js "^1.5.1" + form-data "^4.0.0" + isomorphic-ws "^4.0.1" + jsonwebtoken "~9.0.0" + ws "^7.4.4" + strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" diff --git a/examples/TypeScriptMessaging/App.tsx b/examples/TypeScriptMessaging/App.tsx index 86c052f85b..ffb15303d5 100644 --- a/examples/TypeScriptMessaging/App.tsx +++ b/examples/TypeScriptMessaging/App.tsx @@ -65,7 +65,7 @@ const filters = { members: { $in: ['ron'] }, type: 'messaging', }; -const sort: ChannelSort = { last_message_at: -1 }; +const sort: ChannelSort = { last_updated: -1 }; /** * Start playing with streami18n instance here: diff --git a/examples/TypeScriptMessaging/yarn.lock b/examples/TypeScriptMessaging/yarn.lock index d284b539d9..7e80ecf93a 100644 --- a/examples/TypeScriptMessaging/yarn.lock +++ b/examples/TypeScriptMessaging/yarn.lock @@ -2443,6 +2443,15 @@ axios@^0.22.0: dependencies: follow-redirects "^1.14.4" +axios@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102" + integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -3938,6 +3947,11 @@ follow-redirects@^1.14.4: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -5280,6 +5294,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +linkify-plugin-mention@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/linkify-plugin-mention/-/linkify-plugin-mention-4.1.1.tgz#3ff4a45edc43d56e14582bf66dcadd152a45aeaa" + integrity sha512-7qIOT3FhU4+WlbdRC5sZYZJckOSgBI4Hg6pDXtIOtyaJOYKK3vos4L86yb1veVbyAO2hf4CKoEAGrEvIqKviIA== + linkifyjs@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-4.1.1.tgz#73d427e3bbaaf4ca8e71c589ad4ffda11a9a5fde" @@ -6361,6 +6380,11 @@ prop-types@*, prop-types@^15.5.10, prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -7181,10 +7205,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.19.0: - version "5.19.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.0.tgz#8408f64c7d4eb97fc315e865b0759092e17c09ca" - integrity sha512-p/+Rdo18JIoBkt+BovFnNezh18DXq+/k6WClx1JPgjcJg35OkqXx/W47WLLWuurBw/NR/Il9orFj7JRO/Ebddg== +stream-chat-react-native-core@5.19.3: + version "5.19.3" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.3.tgz#6f99af372bce8414998d4cce13ce0855a1a20386" + integrity sha512-uOJC1tq9VqzaPdv5TL6PWbLar2mCGQ1nYKQ3tdcnQhL3T/3130oizoP0rh/3LB2HUqn19NcngfnzE2FBXTI++w== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.8" @@ -7198,7 +7222,7 @@ stream-chat-react-native-core@5.19.0: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "~8.12.2" + stream-chat "~8.13.1" "stream-chat-react-native-core@link:../../package": version "0.0.0" @@ -7213,10 +7237,10 @@ stream-chat-react-native-devtools@^1.1.0: version "0.0.0" uid "" -stream-chat@~8.12.2: - version "8.12.4" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.12.4.tgz#3c2044ceb74b4be8bd06191963723d7d47014ec1" - integrity sha512-YaNuQNqiJcF82+VKAGNSV8wv0+Th73kHIV4Owiu2Bvhwqt7398Ertr+bxW4WXkBtwKoAeOZOc0oacrUKWQAuKQ== +stream-chat@~8.13.1: + version "8.13.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.13.1.tgz#9781a456487f376d7c9c98271a4f4c926a9e6cf8" + integrity sha512-k0tOmtlLsvVxpZ2EuR+Z/qQiyCHOIjACqwnBZnT1ERA1t3549U2vzkUE6l2tN2VGAgUP1tDl00FhZO5JrAkMKw== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" @@ -7228,6 +7252,21 @@ stream-chat@~8.12.2: jsonwebtoken "~9.0.0" ws "^7.4.4" +stream-chat@~8.14.0: + version "8.14.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.14.1.tgz#f6560c2aa2ce754928d41d6059c61d7cfe770e0a" + integrity sha512-7ersgzFLrUlnV5q09SLcJSEkKMEFNl3E7C5Pk48hzzKuY/eRt8+ojka7t17/cRtF84g3XSW0dSl7C/yB9J5ieQ== + dependencies: + "@babel/runtime" "^7.16.3" + "@types/jsonwebtoken" "~9.0.0" + "@types/ws" "^7.4.0" + axios "^1.6.0" + base64-js "^1.5.1" + form-data "^4.0.0" + isomorphic-ws "^4.0.1" + jsonwebtoken "~9.0.0" + ws "^7.4.4" + strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" diff --git a/package/expo-package/src/handlers/getPhotos.ts b/package/expo-package/src/handlers/getPhotos.ts index 95d44c01a4..f0f65c3962 100644 --- a/package/expo-package/src/handlers/getPhotos.ts +++ b/package/expo-package/src/handlers/getPhotos.ts @@ -12,9 +12,16 @@ export const getPhotos = async ({ first, }: MediaLibrary.AssetsOptions): Promise => { try { - const { status } = await MediaLibrary.requestPermissionsAsync(); + // NOTE: + // should always check first before requesting permission + // because always requesting permission will cause + // the app to go to background even if it was granted + const { status } = await MediaLibrary.getPermissionsAsync(); if (status !== 'granted') { - throw new Error('getPhotos Error'); + const { status: newStatus } = await MediaLibrary.requestPermissionsAsync(); + if (newStatus !== 'granted') { + throw new Error('getPhotos Error'); + } } const results = await MediaLibrary.getAssetsAsync({ after, diff --git a/package/expo-package/yarn.lock b/package/expo-package/yarn.lock index a4e8f5e05b..0c0f546655 100644 --- a/package/expo-package/yarn.lock +++ b/package/expo-package/yarn.lock @@ -3034,10 +3034,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.19.2: - version "5.19.2" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.2.tgz#4a60f639316122816fe749261af2ac54d7bf6395" - integrity sha512-WgNhZXbiNIn5NsXnVp34PDyVhlGWzYdMqOvXRZh4Gdz3uj3VDyn9mUbOJPNXIPntHCimyfnX5A4Ka8JTCBDMXg== +stream-chat-react-native-core@5.19.3: + version "5.19.3" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.3.tgz#6f99af372bce8414998d4cce13ce0855a1a20386" + integrity sha512-uOJC1tq9VqzaPdv5TL6PWbLar2mCGQ1nYKQ3tdcnQhL3T/3130oizoP0rh/3LB2HUqn19NcngfnzE2FBXTI++w== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.8" diff --git a/package/native-package/yarn.lock b/package/native-package/yarn.lock index fe30c2d173..65cb5a00bf 100644 --- a/package/native-package/yarn.lock +++ b/package/native-package/yarn.lock @@ -4379,10 +4379,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.19.2: - version "5.19.2" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.2.tgz#4a60f639316122816fe749261af2ac54d7bf6395" - integrity sha512-WgNhZXbiNIn5NsXnVp34PDyVhlGWzYdMqOvXRZh4Gdz3uj3VDyn9mUbOJPNXIPntHCimyfnX5A4Ka8JTCBDMXg== +stream-chat-react-native-core@5.19.3: + version "5.19.3" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.19.3.tgz#6f99af372bce8414998d4cce13ce0855a1a20386" + integrity sha512-uOJC1tq9VqzaPdv5TL6PWbLar2mCGQ1nYKQ3tdcnQhL3T/3130oizoP0rh/3LB2HUqn19NcngfnzE2FBXTI++w== dependencies: "@babel/runtime" "^7.12.5" "@gorhom/bottom-sheet" "4.4.8" diff --git a/package/package.json b/package/package.json index adb12aec45..05328a7f89 100644 --- a/package/package.json +++ b/package/package.json @@ -79,7 +79,7 @@ "path": "0.12.7", "react-native-markdown-package": "1.8.2", "react-native-url-polyfill": "^1.3.0", - "stream-chat": "~8.13.1" + "stream-chat": "~8.14.0" }, "peerDependencies": { "react-native-quick-sqlite": ">=5.1.0", diff --git a/package/src/__tests__/offline-support/offline-feature.js b/package/src/__tests__/offline-support/offline-feature.js index 4a8acbbb57..3faa638b18 100644 --- a/package/src/__tests__/offline-support/offline-feature.js +++ b/package/src/__tests__/offline-support/offline-feature.js @@ -195,7 +195,7 @@ export const Generic = () => { foo: 'bar', type: 'messaging', }; - const sort = { last_message_at: 1 }; + const sort = { last_updated: 1 }; const renderComponent = () => render( diff --git a/package/src/components/Attachment/Gallery.tsx b/package/src/components/Attachment/Gallery.tsx index 06d86c307a..d7d1ed523e 100644 --- a/package/src/components/Attachment/Gallery.tsx +++ b/package/src/components/Attachment/Gallery.tsx @@ -308,6 +308,9 @@ const GalleryThumbnail = < }; const defaultOnPress = () => { + if ((thumbnail.type === 'video' && !thumbnail.thumb_url) || !thumbnail.url) { + return; + } if (thumbnail.type === 'video' && !isVideoPackageAvailable()) { // This condition is kinda unreachable, since we render videos as file attachment if the video // library is not installed. But doesn't hurt to have extra safeguard, in case of some customizations. diff --git a/package/src/components/Message/MessageSimple/utils/renderText.tsx b/package/src/components/Message/MessageSimple/utils/renderText.tsx index 93b7808ed7..2eec95ae85 100644 --- a/package/src/components/Message/MessageSimple/utils/renderText.tsx +++ b/package/src/components/Message/MessageSimple/utils/renderText.tsx @@ -160,7 +160,7 @@ export const renderText = < : Linking.canOpenURL(url).then((canOpenUrl) => canOpenUrl && Linking.openURL(url)); }; - const link: ReactNodeOutput = (node, output, { ...state }) => { + const linkReact: ReactNodeOutput = (node, output, { ...state }) => { const url = node.target; const onPress = (event: GestureResponderEvent) => { if (!preventPress && onPressParam) { @@ -198,7 +198,7 @@ export const renderText = < ); }; - const paragraphText: ReactNodeOutput = (node, output, { ...state }) => { + const paragraphTextReact: ReactNodeOutput = (node, output, { ...state }) => { if (messageTextNumberOfLines !== undefined) { // If we want to truncate the message text, lets only truncate the first paragraph // and simply not render rest of the paragraphs. @@ -224,12 +224,15 @@ export const renderText = < ? mentioned_users.reduce((acc, cur) => { const userName = cur.name || cur.id || ''; if (userName) { - acc += `${acc.length ? '|' : ''}@${userName}`; + acc += `${acc.length ? '|' : ''}@${userName.replace( + /[.*+?^${}()|[\]\\]/g, + function (match) { + return '\\' + match; + }, + )}`; } - return acc.replace(/[.*+?^${}()|[\]\\]/g, function (match) { - return '\\' + match; - }); + return acc; }, '') : ''; @@ -271,7 +274,7 @@ export const renderText = < ); }; - const list: ReactNodeOutput = (node, output, state) => ( + const listReact: ReactNodeOutput = (node, output, state) => ( null }, - link: { react: link }, - list: { react: list }, + link: { react: linkReact }, + list: { react: listReact }, // Truncate long text content in the message overlay - paragraph: messageTextNumberOfLines ? { react: paragraphText } : {}, + paragraph: messageTextNumberOfLines ? { react: paragraphTextReact } : {}, // we have no react rendering support for reflinks reflink: { match: () => null }, - sublist: { react: list }, + sublist: { react: listReact }, ...(mentionedUsers ? { mentions: { diff --git a/package/src/components/MessageInput/SendButton.tsx b/package/src/components/MessageInput/SendButton.tsx index f8c645abf3..e2c1b5d067 100644 --- a/package/src/components/MessageInput/SendButton.tsx +++ b/package/src/components/MessageInput/SendButton.tsx @@ -28,7 +28,7 @@ const SendButtonWithContext = < const { theme: { colors: { accent_blue, grey_gainsboro }, - messageInput: { sendButton }, + messageInput: { searchIcon, sendButton, sendRightIcon, sendUpIcon }, }, } = useTheme(); @@ -39,9 +39,9 @@ const SendButtonWithContext = < style={[sendButton]} testID='send-button' > - {giphyActive && } - {!giphyActive && disabled && } - {!giphyActive && !disabled && } + {giphyActive && } + {!giphyActive && disabled && } + {!giphyActive && !disabled && } ); }; diff --git a/package/src/components/docs/data.js b/package/src/components/docs/data.js index e16e010676..c431e4e709 100644 --- a/package/src/components/docs/data.js +++ b/package/src/components/docs/data.js @@ -33,7 +33,7 @@ export const suggestionsContext = { }; const filters = { example: 1, type: 'team' }; -const sort = { last_message_at: -1 }; +const sort = { last_updated: -1 }; export const channels = client.queryChannels(filters, sort, { subscribe: true, diff --git a/package/src/contexts/themeContext/utils/theme.ts b/package/src/contexts/themeContext/utils/theme.ts index 132e52fcaf..87292258bb 100644 --- a/package/src/contexts/themeContext/utils/theme.ts +++ b/package/src/contexts/themeContext/utils/theme.ts @@ -278,12 +278,15 @@ export type Theme = { moreOptionsButton: ViewStyle; optionsContainer: ViewStyle; replyContainer: ViewStyle; + searchIcon: IconProps; sendButton: ViewStyle; sendButtonContainer: ViewStyle; sendMessageDisallowedIndicator: { container: ViewStyle; text: TextStyle; }; + sendRightIcon: IconProps; + sendUpIcon: IconProps; showThreadMessageInChannelButton: { check: IconProps; checkBoxActive: ViewStyle; @@ -782,12 +785,15 @@ export const defaultTheme: Theme = { moreOptionsButton: {}, optionsContainer: {}, replyContainer: {}, + searchIcon: {}, sendButton: {}, sendButtonContainer: {}, sendMessageDisallowedIndicator: { container: {}, text: {}, }, + sendRightIcon: {}, + sendUpIcon: {}, showThreadMessageInChannelButton: { check: {}, checkBoxActive: {}, diff --git a/package/yarn.lock b/package/yarn.lock index 2f46497d51..d11548287b 100644 --- a/package/yarn.lock +++ b/package/yarn.lock @@ -3017,12 +3017,14 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -axios@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.22.0.tgz#bf702c41fb50fbca4539589d839a077117b79b25" - integrity sha512-Z0U3uhqQeg1oNcihswf4ZD57O3NrR1+ZXhxaROaWpDmsDTx7T2HNBV2ulBtie2hwJptu8UvgnJoK+BIqdzh/1w== +axios@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102" + integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg== dependencies: - follow-redirects "^1.14.4" + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" babel-code-frame@^6.26.0: version "6.26.0" @@ -5232,10 +5234,10 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.14.4: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== for-each@^0.3.3: version "0.3.3" @@ -8354,6 +8356,11 @@ prop-types@^15.5.10, prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -9499,15 +9506,15 @@ 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@~8.13.1: - version "8.13.1" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.13.1.tgz#9781a456487f376d7c9c98271a4f4c926a9e6cf8" - integrity sha512-k0tOmtlLsvVxpZ2EuR+Z/qQiyCHOIjACqwnBZnT1ERA1t3549U2vzkUE6l2tN2VGAgUP1tDl00FhZO5JrAkMKw== +stream-chat@~8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.14.0.tgz#ba96badaaf6c2d3025f31a6d5c0c5545d883c691" + integrity sha512-WEAssYcY/qSJXVK4B39JZJjyBzLSE4Wn+Gliywm8Nc2cmM0+fJF0853H5jZNy6AEeZhzxzRfxwq71r0FfZKudQ== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" "@types/ws" "^7.4.0" - axios "^0.22.0" + axios "^1.6.0" base64-js "^1.5.1" form-data "^4.0.0" isomorphic-ws "^4.0.1"