diff --git a/.github/workflows/smoke-checks-llc.yml b/.github/workflows/smoke-checks-llc.yml index 47a6378b54f..9b789e6abf4 100644 --- a/.github/workflows/smoke-checks-llc.yml +++ b/.github/workflows/smoke-checks-llc.yml @@ -7,6 +7,9 @@ on: - main pull_request: + paths-ignore: + - 'README.md' + - 'CHANGELOG.md' workflow_dispatch: diff --git a/.github/workflows/smoke-checks.yml b/.github/workflows/smoke-checks.yml index 57c03555546..d0fa2e6de2b 100644 --- a/.github/workflows/smoke-checks.yml +++ b/.github/workflows/smoke-checks.yml @@ -2,8 +2,9 @@ name: Smoke Checks on: pull_request: - branches: - - '**' + paths-ignore: + - 'README.md' + - 'CHANGELOG.md' workflow_dispatch: inputs: diff --git a/.github/workflows/sync-mock-server.yml b/.github/workflows/sync-mock-server.yml index 09a428fd5c6..0db87e3488b 100644 --- a/.github/workflows/sync-mock-server.yml +++ b/.github/workflows/sync-mock-server.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4.1.1 - uses: ./.github/actions/bootstrap - - uses: ./.github/actions/python-cache + - uses: ./.github/actions/ruby-cache - run: bundle exec fastlane sync_mock_server timeout-minutes: 5 env: diff --git a/Gemfile b/Gemfile index 5942f135454..8f5d2832a63 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,8 @@ group :fastlane_dependencies do end group :sinatra_dependencies do + gem 'eventmachine' + gem 'faye-websocket' gem 'puma' gem 'rackup' gem 'stream-chat-ruby', '3.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index c37fc197307..878033382db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,6 +121,7 @@ GEM escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) + eventmachine (1.2.7) excon (0.112.0) faraday (1.10.4) faraday-em_http (~> 1.0) @@ -203,6 +204,9 @@ GEM fastlane-plugin-stream_actions (0.3.77) xctest_list (= 1.2.1) fastlane-plugin-versioning (0.6.0) + faye-websocket (0.11.3) + eventmachine (>= 0.12.0) + websocket-driver (>= 0.5.1) ffi (1.17.0) fourflusher (2.3.1) fuzzy_match (2.0.4) @@ -409,6 +413,9 @@ GEM uber (0.1.0) unicode-display_width (2.6.0) webrick (1.8.2) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) word_wrap (1.0.0) xcinvoke (0.3.0) liferaft (~> 0.0.6) @@ -435,12 +442,14 @@ DEPENDENCIES cocoapods danger danger-commit_lint + eventmachine fastlane fastlane-plugin-create_xcframework fastlane-plugin-lizard fastlane-plugin-sonarcloud_metric_kit fastlane-plugin-stream_actions (= 0.3.77) fastlane-plugin-versioning + faye-websocket jazzy json plist diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_add_member.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_add_member.json index 86dc3f5d72e..74b886d501f 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_add_member.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_add_member.json @@ -1,234 +1,254 @@ { - "channel": { - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "config": { - "automod": "AI", - "automod_behavior": "block", - "automod_thresholds": { - "explicit": { - "block": 0.9, - "flag": 0.85 - }, - "spam": { - "block": 0.9, - "flag": 0.85 - }, - "toxic": { - "block": 0.9, - "flag": 0.85 - } - }, - "blocklist": "profanity_en_2020_v1", - "blocklist_behavior": "block", - "commands": [ - { - "args": "[text]", - "description": "Post a random gif to the channel", - "name": "giphy", - "set": "fun_set" - } - ], - "connect_events": true, - "created_at": "2021-03-01T19:26:18.406502Z", - "custom_events": true, - "mark_messages_pending": false, - "max_message_length": 5000, - "message_retention": "infinite", - "mutes": true, - "name": "messaging", - "polls": true, - "push_notifications": true, - "quotes": true, - "reactions": true, - "read_events": true, - "reminders": false, - "replies": true, - "search": true, - "skip_last_msg_update_for_system_msgs": false, - "typing_events": true, - "updated_at": "2024-11-13T11:49:47.368244Z", - "uploads": true, - "url_enrichment": true - }, - "created_at": "2025-01-15T00:14:09.719947Z", - "created_by": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "disabled": false, - "frozen": false, - "hidden": false, - "id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "last_message_at": "2025-01-15T00:14:13.273479Z", - "member_count": 4, - "name": "Sync Mock Server", - "own_capabilities": [ - "ban-channel-members", - "cast-poll-vote", - "connect-events", - "create-attachment", - "delete-any-message", - "delete-channel", - "delete-own-message", - "flag-message", - "join-channel", - "leave-channel", - "mute-channel", - "pin-message", - "query-poll-votes", - "quote-message", - "read-events", - "search-messages", - "send-custom-events", - "send-links", - "send-message", - "send-poll", - "send-reaction", - "send-reply", - "send-typing-events", - "set-channel-cooldown", - "skip-slow-mode", - "typing-events", - "update-any-message", - "update-channel", - "update-channel-members", - "update-own-message", - "update-thread", - "upload-file" - ], - "type": "messaging", - "updated_at": "2025-01-15T00:14:09.719948Z" + "channel": { + "id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "type": "messaging", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "last_message_at": "2025-01-31T16:18:37.094228Z", + "created_at": "2025-01-31T16:18:35.560277Z", + "updated_at": "2025-01-31T16:18:35.560277Z", + "created_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" }, - "duration": "37.32ms", - "members": [ - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - }, - "user_id": "count_dooku" + "frozen": false, + "disabled": false, + "member_count": 4, + "config": { + "created_at": "2021-03-01T19:26:18.406502Z", + "updated_at": "2024-11-13T11:49:47.368244Z", + "name": "messaging", + "typing_events": true, + "read_events": true, + "connect_events": true, + "search": true, + "reactions": true, + "replies": true, + "quotes": true, + "mutes": true, + "uploads": true, + "url_enrichment": true, + "custom_events": true, + "push_notifications": true, + "reminders": false, + "mark_messages_pending": false, + "polls": true, + "message_retention": "infinite", + "max_message_length": 5000, + "automod": "AI", + "automod_behavior": "block", + "blocklist": "profanity_en_2020_v1", + "blocklist_behavior": "block", + "automod_thresholds": { + "explicit": { + "flag": 0.85, + "block": 0.9 }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - }, - "user_id": "han_solo" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" + "spam": { + "flag": 0.85, + "block": 0.9 }, + "toxic": { + "flag": 0.85, + "block": 0.9 + } + }, + "skip_last_msg_update_for_system_msgs": false, + "commands": [ { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:13.737559Z", - "notifications_muted": false, - "role": "admin", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:13.737559Z", - "user": { - "banned": false, - "birthland": "Polis Massa", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:42:00.68335Z", - "id": "leia_organa", - "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", - "language": "ru", - "last_active": "2025-01-14T16:41:35.547087Z", - "name": "Leia Organa", - "online": false, - "private_settings": { - "readReceipts": { - "enabled": false - }, - "typingIndicators": { - "enabled": false - } - }, - "role": "admin", - "teams": [], - "updated_at": "2025-01-03T22:09:07.068442Z" - }, - "user_id": "leia_organa" + "name": "giphy", + "description": "Post a random gif to the channel", + "args": "[text]", + "set": "fun_set" + } + ] + }, + "own_capabilities": [ + "ban-channel-members", + "cast-poll-vote", + "connect-events", + "create-attachment", + "delete-any-message", + "delete-channel", + "delete-own-message", + "flag-message", + "join-channel", + "leave-channel", + "mute-channel", + "pin-message", + "query-poll-votes", + "quote-message", + "read-events", + "search-messages", + "send-custom-events", + "send-links", + "send-message", + "send-poll", + "send-reaction", + "send-reply", + "send-typing-events", + "set-channel-cooldown", + "skip-slow-mode", + "typing-events", + "update-any-message", + "update-channel", + "update-channel-members", + "update-own-message", + "update-thread", + "upload-file" + ], + "hidden": false, + "name": "Sync Mock Server" + }, + "members": [ + { + "user_id": "count_dooku", + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "han_solo", + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "birthland": "Corellia" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "leia_organa", + "user": { + "id": "leia_organa", + "name": "Leia Organa", + "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", + "language": "ru", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:42:00.68335Z", + "updated_at": "2025-01-16T12:34:56.765249Z", + "banned": false, + "online": false, + "last_active": "2025-01-29T16:35:31.022088Z", + "blocked_user_ids": [ + + ], + "birthland": "Polis Massa", + "private_settings": { + "readReceipts": { + "enabled": false + }, + "typingIndicators": { + "enabled": false + } } - ] + }, + "status": "member", + "created_at": "2025-01-31T16:18:37.521245Z", + "updated_at": "2025-01-31T16:18:37.521245Z", + "banned": false, + "shadow_banned": false, + "role": "admin", + "channel_role": "channel_member", + "notifications_muted": false + } + ], + "duration": "48.95ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_attachment.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_attachment.json index ad8d9baf40c..87e398ab0bf 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_attachment.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_attachment.json @@ -1,4 +1,4 @@ { - "duration": "340.11ms", - "file": "https://frankfurt.stream-io-cdn.com/102399/images/76cf8ae7-3681-4a43-939d-334b130f8b39.yoda.jpg?Key-Pair-Id=APKAIHG36VEWPDULE23Q&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9mcmFua2Z1cnQuc3RyZWFtLWlvLWNkbi5jb20vMTAyMzk5L2ltYWdlcy83NmNmOGFlNy0zNjgxLTRhNDMtOTM5ZC0zMzRiMTMwZjhiMzkueW9kYS5qcGc~Km9oPTUxNSpvdz01MTUqIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzM4MTA5NjU0fX19XX0_&Signature=kFei1SE4HmXSER4aIGQ8RkZRtNWqQElED~vLVvMu291~FrCNsHK2B~nczREuKMEhfUOJgcHY0yqT6Ik7VLQ~iHdfhw1HgPT1yM0lortvz6t36UKlXtgr6RoV8eHyjRDW2RWiVQL3Fc3NTP7zBKbdy~j1zsMiae8TjovbybH8DwhYq2VNXvLCG9bk8jDwbBLQuaRa5j-tq1VZQzxKl~Fi9RuZTAeDuvhnGmmaZyYt~-Z1zhcoxLny0WVXH8LAbiQRYEBtzeD9IEsHDDOucJccefijpLmFEmzNgUNc~7L8JHy7gE4lluTSn7~czfpTzAiDtC6AdMVEOICnL9sdQH2uag__&oh=515&ow=515" + "file": "https://frankfurt.stream-io-cdn.com/102399/images/da9d0ac2-77f1-47ae-b369-8a80dde644be.yoda.jpg?Key-Pair-Id=APKAIHG36VEWPDULE23Q&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9mcmFua2Z1cnQuc3RyZWFtLWlvLWNkbi5jb20vMTAyMzk5L2ltYWdlcy9kYTlkMGFjMi03N2YxLTQ3YWUtYjM2OS04YTgwZGRlNjQ0YmUueW9kYS5qcGc~Km9oPTAqb3c9MCoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3Mzk1NDk5MTd9fX1dfQ__&Signature=Vn6bN5uCpQcw9TrIHzsG0IVOPezLsg8paeE3HQwK4SkUdqUWLQaAMDiEOcW9xsNbTLW3WZArI9buSklsJSXbD9Q1vjML9L3zXBJswGaYTHDrD9OOn4MRNpeHz~t8rCx55fMNwmAp7wX2evCdwVHS315GnWHsM6yl8i8CzsFXSxUggZI0Y207SEvBzc0ZUOxEUiFfYuGEYpwVmX9q2S2azEiqVB4Hprt6i4guXme-ESsikDF4mvy3cC7XKm5kNJw7IXgXOzyU9pPlQMyS-QvdfXtCWvBgQezwBnXFQwyrCOphB4GsyQ9jOIq4wL86LkwLex2ia8WN1qaWt1Ik2qK6mA__&oh=0&ow=0", + "duration": "115.34ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_creation.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_creation.json index 2b171cdb6bb..676ae1ce815 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_creation.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_creation.json @@ -1,294 +1,309 @@ { - "channel": { - "blocked": false, - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "config": { - "automod": "AI", - "automod_behavior": "block", - "automod_thresholds": { - "explicit": { - "block": 0.9, - "flag": 0.85 - }, - "spam": { - "block": 0.9, - "flag": 0.85 - }, - "toxic": { - "block": 0.9, - "flag": 0.85 - } - }, - "blocklist": "profanity_en_2020_v1", - "blocklist_behavior": "block", - "commands": [ - { - "args": "[text]", - "description": "Post a random gif to the channel", - "name": "giphy", - "set": "fun_set" - } - ], - "connect_events": true, - "created_at": "2021-03-01T19:26:18.406502Z", - "custom_events": true, - "mark_messages_pending": false, - "max_message_length": 5000, - "message_retention": "infinite", - "mutes": true, - "name": "messaging", - "polls": true, - "push_notifications": true, - "quotes": true, - "reactions": true, - "read_events": true, - "reminders": false, - "replies": true, - "search": true, - "skip_last_msg_update_for_system_msgs": false, - "typing_events": true, - "updated_at": "2024-11-13T11:49:47.368244Z", - "uploads": true, - "url_enrichment": true - }, - "created_at": "2025-01-15T00:14:09.719947Z", - "created_by": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "disabled": false, - "frozen": false, - "hidden": false, - "id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "member_count": 3, - "name": "Sync Mock Server", - "own_capabilities": [ - "ban-channel-members", - "cast-poll-vote", - "connect-events", - "create-attachment", - "delete-any-message", - "delete-channel", - "delete-own-message", - "flag-message", - "join-channel", - "leave-channel", - "mute-channel", - "pin-message", - "query-poll-votes", - "quote-message", - "read-events", - "search-messages", - "send-custom-events", - "send-links", - "send-message", - "send-poll", - "send-reaction", - "send-reply", - "send-typing-events", - "set-channel-cooldown", - "skip-slow-mode", - "typing-events", - "update-any-message", - "update-channel", - "update-channel-members", - "update-own-message", - "update-thread", - "upload-file" - ], - "type": "messaging", - "updated_at": "2025-01-15T00:14:09.719948Z" + "channel": { + "id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "type": "messaging", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:35.560277Z", + "updated_at": "2025-01-31T16:18:35.560277Z", + "created_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test", + "type": "team" }, - "duration": "244.97ms", - "members": [ - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - }, - "user_id": "count_dooku" + "frozen": false, + "disabled": false, + "member_count": 3, + "config": { + "created_at": "2021-03-01T19:26:18.406502Z", + "updated_at": "2024-11-13T11:49:47.368244Z", + "name": "messaging", + "typing_events": true, + "read_events": true, + "connect_events": true, + "search": true, + "reactions": true, + "replies": true, + "quotes": true, + "mutes": true, + "uploads": true, + "url_enrichment": true, + "custom_events": true, + "push_notifications": true, + "reminders": false, + "mark_messages_pending": false, + "polls": true, + "message_retention": "infinite", + "max_message_length": 5000, + "automod": "AI", + "automod_behavior": "block", + "blocklist": "profanity_en_2020_v1", + "blocklist_behavior": "block", + "automod_thresholds": { + "explicit": { + "flag": 0.85, + "block": 0.9 }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - }, - "user_id": "han_solo" + "spam": { + "flag": 0.85, + "block": 0.9 }, + "toxic": { + "flag": 0.85, + "block": 0.9 + } + }, + "skip_last_msg_update_for_system_msgs": false, + "commands": [ { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" + "name": "giphy", + "description": "Post a random gif to the channel", + "args": "[text]", + "set": "fun_set" } + ] + }, + "own_capabilities": [ + "ban-channel-members", + "cast-poll-vote", + "connect-events", + "create-attachment", + "delete-any-message", + "delete-channel", + "delete-own-message", + "flag-message", + "join-channel", + "leave-channel", + "mute-channel", + "pin-message", + "query-poll-votes", + "quote-message", + "read-events", + "search-messages", + "send-custom-events", + "send-links", + "send-message", + "send-poll", + "send-reaction", + "send-reply", + "send-typing-events", + "set-channel-cooldown", + "skip-slow-mode", + "typing-events", + "update-any-message", + "update-channel", + "update-channel-members", + "update-own-message", + "update-thread", + "upload-file" ], - "membership": { + "hidden": false, + "blocked": false, + "name": "Sync Mock Server" + }, + "messages": [ + + ], + "pinned_messages": [ + + ], + "watcher_count": 1, + "read": [ + { + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" + }, + "last_read": "2025-01-31T16:18:35.584603445Z", + "unread_messages": 0 }, - "messages": [], - "pinned_messages": [], - "read": [ - { - "last_read": "2025-01-15T00:14:09.793969434Z", - "unread_messages": 0, - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - } - }, - { - "last_read": "2025-01-15T00:14:09.793969434Z", - "unread_messages": 0, - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - } - }, - { - "last_read": "2025-01-15T00:14:09.793969434Z", - "unread_messages": 0, - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } - } - ], - "threads": [], - "watcher_count": 1 + { + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test" + }, + "last_read": "2025-01-31T16:18:35.584603445Z", + "unread_messages": 0 + } + ], + "members": [ + { + "user_id": "count_dooku", + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "han_solo", + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "birthland": "Corellia" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false + } + ], + "membership": { + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false + }, + "threads": [ + + ], + "duration": "65.79ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_removal.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_removal.json index 8b6e9ea50cc..dd8f1ad1fa5 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_removal.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channel_removal.json @@ -1,199 +1,219 @@ { - "channel": { - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "config": { - "automod": "AI", - "automod_behavior": "block", - "automod_thresholds": { - "explicit": { - "block": 0.9, - "flag": 0.85 - }, - "spam": { - "block": 0.9, - "flag": 0.85 - }, - "toxic": { - "block": 0.9, - "flag": 0.85 - } - }, - "blocklist": "profanity_en_2020_v1", - "blocklist_behavior": "block", - "commands": [ - { - "args": "[text]", - "description": "Post a random gif to the channel", - "name": "giphy", - "set": "fun_set" - } - ], - "connect_events": true, - "created_at": "2021-03-01T19:26:18.406502Z", - "custom_events": true, - "mark_messages_pending": false, - "max_message_length": 5000, - "message_retention": "infinite", - "mutes": true, - "name": "messaging", - "polls": true, - "push_notifications": true, - "quotes": true, - "reactions": true, - "read_events": true, - "reminders": false, - "replies": true, - "search": true, - "skip_last_msg_update_for_system_msgs": false, - "typing_events": true, - "updated_at": "2024-11-13T11:49:47.368244Z", - "uploads": true, - "url_enrichment": true + "duration": "30.73ms", + "channel": { + "id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "type": "messaging", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:35.560277Z", + "updated_at": "2025-01-31T16:18:39.67828Z", + "deleted_at": "2025-01-31T16:18:39.924361Z", + "created_by": null, + "frozen": false, + "disabled": false, + "members": [ + { + "user_id": "count_dooku", + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" }, - "created_at": "2025-01-15T00:14:09.719947Z", - "created_by": null, - "deleted_at": "2025-01-15T00:14:18.246743Z", - "disabled": false, - "frozen": false, - "id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "members": [ - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - }, - "user_id": "count_dooku" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - }, - "user_id": "han_solo" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "han_solo", + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "birthland": "Corellia" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "leia_organa", + "user": { + "id": "leia_organa", + "name": "Leia Organa", + "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", + "language": "ru", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:42:00.68335Z", + "updated_at": "2025-01-16T12:34:56.765249Z", + "banned": false, + "online": false, + "last_active": "2025-01-29T16:35:31.022088Z", + "blocked_user_ids": [ + + ], + "private_settings": { + "readReceipts": { + "enabled": false }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:13.737559Z", - "notifications_muted": false, - "role": "admin", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:13.737559Z", - "user": { - "banned": false, - "birthland": "Polis Massa", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:42:00.68335Z", - "id": "leia_organa", - "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", - "language": "ru", - "last_active": "2025-01-14T16:41:35.547087Z", - "name": "Leia Organa", - "online": false, - "private_settings": { - "readReceipts": { - "enabled": false - }, - "typingIndicators": { - "enabled": false - } - }, - "role": "admin", - "teams": [], - "updated_at": "2025-01-03T22:09:07.068442Z" - }, - "user_id": "leia_organa" + "typingIndicators": { + "enabled": false } - ], - "truncated_at": "2025-01-15T00:14:18.246743Z", - "truncated_by": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + }, + "birthland": "Polis Massa" + }, + "status": "member", + "created_at": "2025-01-31T16:18:37.521245Z", + "updated_at": "2025-01-31T16:18:37.521245Z", + "banned": false, + "shadow_banned": false, + "role": "admin", + "channel_role": "channel_member", + "notifications_muted": false + } + ], + "config": { + "created_at": "2021-03-01T19:26:18.406502Z", + "updated_at": "2024-11-13T11:49:47.368244Z", + "name": "messaging", + "typing_events": true, + "read_events": true, + "connect_events": true, + "search": true, + "reactions": true, + "replies": true, + "quotes": true, + "mutes": true, + "uploads": true, + "url_enrichment": true, + "custom_events": true, + "push_notifications": true, + "reminders": false, + "mark_messages_pending": false, + "polls": true, + "message_retention": "infinite", + "max_message_length": 5000, + "automod": "AI", + "automod_behavior": "block", + "blocklist": "profanity_en_2020_v1", + "blocklist_behavior": "block", + "automod_thresholds": { + "explicit": { + "flag": 0.85, + "block": 0.9 + }, + "spam": { + "flag": 0.85, + "block": 0.9 }, - "type": "messaging", - "updated_at": "2025-01-15T00:14:17.966563Z" + "toxic": { + "flag": 0.85, + "block": 0.9 + } + }, + "skip_last_msg_update_for_system_msgs": false, + "commands": [ + { + "name": "giphy", + "description": "Post a random gif to the channel", + "args": "[text]", + "set": "fun_set" + } + ] }, - "duration": "28.53ms" + "truncated_at": "2025-01-31T16:18:39.924361Z", + "truncated_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + } + } } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channels.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channels.json index 012dbc29be5..9fca117f4a2 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channels.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_channels.json @@ -1,297 +1,335 @@ { - "channels": [ - { - "channel": { - "blocked": false, - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "config": { - "automod": "AI", - "automod_behavior": "block", - "automod_thresholds": { - "explicit": { - "block": 0.9, - "flag": 0.85 - }, - "spam": { - "block": 0.9, - "flag": 0.85 - }, - "toxic": { - "block": 0.9, - "flag": 0.85 - } - }, - "blocklist": "profanity_en_2020_v1", - "blocklist_behavior": "block", - "commands": [ - { - "args": "[text]", - "description": "Post a random gif to the channel", - "name": "giphy", - "set": "fun_set" - } - ], - "connect_events": true, - "created_at": "2021-03-01T19:26:18.406502Z", - "custom_events": true, - "mark_messages_pending": false, - "max_message_length": 5000, - "message_retention": "infinite", - "mutes": true, - "name": "messaging", - "polls": true, - "push_notifications": true, - "quotes": true, - "reactions": true, - "read_events": true, - "reminders": false, - "replies": true, - "search": true, - "skip_last_msg_update_for_system_msgs": false, - "typing_events": true, - "updated_at": "2024-11-13T11:49:47.368244Z", - "uploads": true, - "url_enrichment": true - }, - "created_at": "2025-01-15T00:14:09.719947Z", - "created_by": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "disabled": false, - "frozen": false, - "hidden": false, - "id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "member_count": 3, - "name": "Sync Mock Server", - "own_capabilities": [ - "ban-channel-members", - "cast-poll-vote", - "connect-events", - "create-attachment", - "delete-any-message", - "delete-channel", - "delete-own-message", - "flag-message", - "join-channel", - "leave-channel", - "mute-channel", - "pin-message", - "query-poll-votes", - "quote-message", - "read-events", - "search-messages", - "send-custom-events", - "send-links", - "send-message", - "send-poll", - "send-reaction", - "send-reply", - "send-typing-events", - "set-channel-cooldown", - "skip-slow-mode", - "typing-events", - "update-any-message", - "update-channel", - "update-channel-members", - "update-own-message", - "update-thread", - "upload-file" - ], - "type": "messaging", - "updated_at": "2025-01-15T00:14:09.719948Z" + "channels": [ + { + "channel": { + "id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "type": "messaging", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:35.560277Z", + "updated_at": "2025-01-31T16:18:35.560277Z", + "created_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "frozen": false, + "disabled": false, + "member_count": 3, + "config": { + "created_at": "2021-03-01T19:26:18.406502Z", + "updated_at": "2024-11-13T11:49:47.368244Z", + "name": "messaging", + "typing_events": true, + "read_events": true, + "connect_events": true, + "search": true, + "reactions": true, + "replies": true, + "quotes": true, + "mutes": true, + "uploads": true, + "url_enrichment": true, + "custom_events": true, + "push_notifications": true, + "reminders": false, + "mark_messages_pending": false, + "polls": true, + "message_retention": "infinite", + "max_message_length": 5000, + "automod": "AI", + "automod_behavior": "block", + "blocklist": "profanity_en_2020_v1", + "blocklist_behavior": "block", + "automod_thresholds": { + "explicit": { + "flag": 0.85, + "block": 0.9 }, - "members": [ - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - }, - "user_id": "count_dooku" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - }, - "user_id": "han_solo" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" - } - ], - "membership": { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "spam": { + "flag": 0.85, + "block": 0.9 }, - "messages": [], - "pinned_messages": [], - "read": [ - { - "last_read": "2025-01-15T00:14:09.793969434Z", - "unread_messages": 0, - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - } - }, - { - "last_read": "2025-01-15T00:14:09.793969434Z", - "unread_messages": 0, - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - } - }, - { - "last_read": "2025-01-15T00:14:09.793969434Z", - "unread_messages": 0, - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } - } + "toxic": { + "flag": 0.85, + "block": 0.9 + } + }, + "skip_last_msg_update_for_system_msgs": false, + "commands": [ + { + "name": "giphy", + "description": "Post a random gif to the channel", + "args": "[text]", + "set": "fun_set" + } + ] + }, + "own_capabilities": [ + "ban-channel-members", + "cast-poll-vote", + "connect-events", + "create-attachment", + "delete-any-message", + "delete-channel", + "delete-own-message", + "flag-message", + "join-channel", + "leave-channel", + "mute-channel", + "pin-message", + "query-poll-votes", + "quote-message", + "read-events", + "search-messages", + "send-custom-events", + "send-links", + "send-message", + "send-poll", + "send-reaction", + "send-reply", + "send-typing-events", + "set-channel-cooldown", + "skip-slow-mode", + "typing-events", + "update-any-message", + "update-channel", + "update-channel-members", + "update-own-message", + "update-thread", + "upload-file" + ], + "hidden": false, + "blocked": false, + "name": "Sync Mock Server" + }, + "messages": [ + + ], + "pinned_messages": [ + + ], + "watcher_count": 1, + "read": [ + { + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" + }, + "unread_messages": 0, + "last_read": "2025-01-31T16:18:35Z" + }, + { + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "birthland": "Corellia" + }, + "unread_messages": 0, + "last_read": "2025-01-31T16:18:35Z" + }, + { + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "unread_messages": 0, + "last_read": "2025-01-31T16:18:35Z" + } + ], + "members": [ + { + "user_id": "count_dooku", + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "han_solo", + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "birthland": "Corellia" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + ], - "threads": [], - "watcher_count": 1 + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false } - ], - "duration": "97.03ms" + ], + "membership": { + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "channel_role": "channel_member", + "notifications_muted": false + }, + "threads": [ + + ] + } + ], + "duration": "121.59ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_events.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_events.json index e29a6d3b346..0e684119d8d 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_events.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_events.json @@ -1,28 +1,32 @@ { - "duration": "7.00ms", - "event": { - "channel_id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "channel_type": "messaging", - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:11.51588868Z", - "type": "typing.start", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } - } + "event": { + "type": "typing.start", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_type": "messaging", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "created_at": "2025-01-31T16:18:36.200384029Z" + }, + "duration": "6.70ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_giphy_link.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_giphy_link.json new file mode 100644 index 00000000000..f84ade5ea03 --- /dev/null +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_giphy_link.json @@ -0,0 +1,67 @@ +{ + "message": { + "id": "b78d492d-b171-4209-97fb-2327c8bfe34d", + "text": "https://giphy.com/gifs/test-gw3IWyGkC0rsazTi", + "html": "
https://giphy.com/gifs/test-gw3IWyGkC0rsazTi
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test", + "type": "team" + }, + "attachments": [ + { + "type": "video", + "title": "Test Computer GIF - Find & Share on GIPHY", + "title_link": "https://giphy.com/gifs/test-gw3IWyGkC0rsazTi", + "text": "Discover & share this Test Computer GIF with everyone you know. GIPHY is how you search, share, discover, and create GIFs.", + "image_url": "https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExdnN6bThhZnN4bHQ3dTl3YzA2dDB6ZWhqcm4weGJtNzR6b2p0eHN2MSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gw3IWyGkC0rsazTi/giphy.webp", + "thumb_url": "https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExdnN6bThhZnN4bHQ3dTl3YzA2dDB6ZWhqcm4weGJtNzR6b2p0eHN2MSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gw3IWyGkC0rsazTi/giphy.webp", + "asset_url": "https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExdnN6bThhZnN4bHQ3dTl3YzA2dDB6ZWhqcm4weGJtNzR6b2p0eHN2MSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gw3IWyGkC0rsazTi/giphy.mp4", + "og_scrape_url": "https://giphy.com/gifs/test-gw3IWyGkC0rsazTi" + } + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:39.448734Z", + "updated_at": "2025-01-31T16:18:39.448734Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "duration": "217.62ms" +} \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message.json index 47651488ed1..d390b1059ea 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message.json @@ -1,44 +1,58 @@ { - "duration": "1597.84ms", - "message": { - "attachments": [], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.273479Z", - "deleted_reply_count": 0, - "html": "Test
\n", - "id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": {}, - "reaction_scores": {}, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "Test", - "type": "regular", - "updated_at": "2025-01-15T00:14:13.273479Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } - } + "message": { + "id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "text": "Test", + "html": "Test
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test" + }, + "attachments": [ + + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:37.094228Z", + "updated_at": "2025-01-31T16:18:37.094228Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "duration": "736.77ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message_ephemeral.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message_ephemeral.json index 82e70591645..bfa31c20fec 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message_ephemeral.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_message_ephemeral.json @@ -1,135 +1,142 @@ { - "duration": "294.96ms", - "message": { - "args": "Test", - "attachments": [ - { - "actions": [ - { - "name": "image_action", - "style": "primary", - "text": "Send", - "type": "button", - "value": "send" - }, - { - "name": "image_action", - "style": "default", - "text": "Shuffle", - "type": "button", - "value": "shuffle" - }, - { - "name": "image_action", - "style": "default", - "text": "Cancel", - "type": "button", - "value": "cancel" - } - ], - "giphy": { - "fixed_height": { - "frames": "", - "height": "200", - "size": "41213", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/200.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=200.gif&ct=g", - "width": "200" - }, - "fixed_height_downsampled": { - "frames": "", - "height": "200", - "size": "22785", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/200_d.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=200_d.gif&ct=g", - "width": "200" - }, - "fixed_height_still": { - "frames": "", - "height": "200", - "size": "14728", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/200_s.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=200_s.gif&ct=g", - "width": "200" - }, - "fixed_width": { - "frames": "", - "height": "200", - "size": "41213", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/200w.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=200w.gif&ct=g", - "width": "200" - }, - "fixed_width_downsampled": { - "frames": "", - "height": "200", - "size": "22785", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/200w_d.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=200w_d.gif&ct=g", - "width": "200" - }, - "fixed_width_still": { - "frames": "", - "height": "200", - "size": "14728", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/200w_s.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=200w_s.gif&ct=g", - "width": "200" - }, - "original": { - "frames": "15", - "height": "480", - "size": "161227", - "url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/giphy.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=giphy.gif&ct=g", - "width": "480" - } - }, - "thumb_url": "https://media0.giphy.com/media/LYYUbaUepaFv9k5mMq/giphy.gif?cid=c4b03675mvp0uk8lg5dykwvkohmslw0qbtxnzit2gkze64il&ep=v1_gifs_search&rid=giphy.gif&ct=g", - "title": "Test", - "title_link": "https://giphy.com/gifs/plusQA-test-partner-test-LYYUbaUepaFv9k5mMq", - "type": "giphy" - } + "message": { + "id": "40ee6375-ab6f-4dd1-885b-6f37b7053420", + "text": "/giphy Test", + "command": "giphy", + "html": "/giphy Test
\n", + "type": "ephemeral", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test" + }, + "attachments": [ + { + "type": "giphy", + "title": "Test", + "title_link": "https://giphy.com/gifs/school-test-annoyed-cJ7gVV0QL9RPG", + "thumb_url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/giphy.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=giphy.gif&ct=g", + "actions": [ + { + "name": "image_action", + "text": "Send", + "style": "primary", + "type": "button", + "value": "send" + }, + { + "name": "image_action", + "text": "Shuffle", + "style": "default", + "type": "button", + "value": "shuffle" + }, + { + "name": "image_action", + "text": "Cancel", + "style": "default", + "type": "button", + "value": "cancel" + } ], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "command": "giphy", - "command_info": { - "name": "Giphy" - }, - "created_at": "2025-01-15T00:14:14.790703Z", - "deleted_reply_count": 0, - "html": "/giphy Test
\n", - "i18n": { - "en_text": "/giphy Test", - "language": "en", - "ru_text": "/giphy тест" - }, - "id": "a6f96696-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": {}, - "reaction_scores": {}, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "/giphy Test", - "type": "ephemeral", - "updated_at": "2025-01-15T00:14:14.790703Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "giphy": { + "original": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/giphy.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=giphy.gif&ct=g", + "width": "250", + "height": "157", + "size": "509090", + "frames": "25" + }, + "fixed_height": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/200.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=200.gif&ct=g", + "width": "318", + "height": "200", + "size": "568679", + "frames": "" + }, + "fixed_height_still": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/200_s.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=200_s.gif&ct=g", + "width": "318", + "height": "200", + "size": "23937", + "frames": "" + }, + "fixed_height_downsampled": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/200_d.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=200_d.gif&ct=g", + "width": "318", + "height": "200", + "size": "152752", + "frames": "" + }, + "fixed_width": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/200w.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=200w.gif&ct=g", + "width": "200", + "height": "126", + "size": "387570", + "frames": "" + }, + "fixed_width_still": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/200w_s.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=200w_s.gif&ct=g", + "width": "200", + "height": "126", + "size": "15905", + "frames": "" + }, + "fixed_width_downsampled": { + "url": "https://media1.giphy.com/media/cJ7gVV0QL9RPG/200w_d.gif?cid=c4b036753mf32agujfmseqxlghr13nakqw3bgfmvrgjesayg&ep=v1_gifs_search&rid=200w_d.gif&ct=g", + "width": "200", + "height": "126", + "size": "89634", + "frames": "" + } } + } + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:38.068878Z", + "updated_at": "2025-01-31T16:18:38.068878Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null, + "args": "Test", + "command_info": { + "name": "Giphy" } + }, + "duration": "34.12ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_reaction.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_reaction.json index f3bf88aed51..09481e7d332 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_reaction.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_reaction.json @@ -1,136 +1,156 @@ { - "duration": "31.26ms", - "message": { - "attachments": [], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.273479Z", - "deleted_reply_count": 0, - "html": "Test
\n", - "id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [ - { - "created_at": "2025-01-15T00:14:13.509816Z", - "message_id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "score": 1, - "type": "like", - "updated_at": "2025-01-15T00:14:13.509816Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" - } - ], - "mentioned_users": [], - "own_reactions": [ - { - "created_at": "2025-01-15T00:14:13.509816Z", - "message_id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "score": 1, - "type": "like", - "updated_at": "2025-01-15T00:14:13.509816Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" - } - ], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": { - "like": 1 - }, - "reaction_groups": { - "like": { - "count": 1, - "first_reaction_at": "2025-01-15T00:14:13.509816Z", - "last_reaction_at": "2025-01-15T00:14:13.509816Z", - "sum_scores": 1 - } - }, - "reaction_scores": { - "like": 1 - }, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "Test", - "type": "regular", - "updated_at": "2025-01-15T00:14:13.519027Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "message": { + "id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "text": "Test", + "html": "Test
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" }, - "reaction": { - "created_at": "2025-01-15T00:14:13.509816Z", - "message_id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "score": 1, + "attachments": [ + + ], + "latest_reactions": [ + { + "message_id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test" + }, "type": "like", - "updated_at": "2025-01-15T00:14:13.509816Z", + "score": 1, + "created_at": "2025-01-31T16:18:37.304432Z", + "updated_at": "2025-01-31T16:18:37.304432Z" + } + ], + "own_reactions": [ + { + "message_id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "user_id": "luke_skywalker", "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" }, - "user_id": "luke_skywalker" - } + "type": "like", + "score": 1, + "created_at": "2025-01-31T16:18:37.304432Z", + "updated_at": "2025-01-31T16:18:37.304432Z" + } + ], + "reaction_counts": { + "like": 1 + }, + "reaction_scores": { + "like": 1 + }, + "reaction_groups": { + "like": { + "count": 1, + "sum_scores": 1, + "first_reaction_at": "2025-01-31T16:18:37.304432Z", + "last_reaction_at": "2025-01-31T16:18:37.304432Z" + } + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:37.094228Z", + "updated_at": "2025-01-31T16:18:37.310539Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "reaction": { + "message_id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "type": "like", + "score": 1, + "created_at": "2025-01-31T16:18:37.304432Z", + "updated_at": "2025-01-31T16:18:37.304432Z" + }, + "duration": "25.87ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_truncate.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_truncate.json index 2835314b952..89cbffa70e8 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_truncate.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_truncate.json @@ -1,259 +1,297 @@ { - "channel": { - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "config": { - "automod": "AI", - "automod_behavior": "block", - "automod_thresholds": { - "explicit": { - "block": 0.9, - "flag": 0.85 - }, - "spam": { - "block": 0.9, - "flag": 0.85 - }, - "toxic": { - "block": 0.9, - "flag": 0.85 - } - }, - "blocklist": "profanity_en_2020_v1", - "blocklist_behavior": "block", - "commands": [ - { - "args": "[text]", - "description": "Post a random gif to the channel", - "name": "giphy", - "set": "fun_set" - } - ], - "connect_events": true, - "created_at": "2021-03-01T19:26:18.406502Z", - "custom_events": true, - "mark_messages_pending": false, - "max_message_length": 5000, - "message_retention": "infinite", - "mutes": true, - "name": "messaging", - "polls": true, - "push_notifications": true, - "quotes": true, - "reactions": true, - "read_events": true, - "reminders": false, - "replies": true, - "search": true, - "skip_last_msg_update_for_system_msgs": false, - "typing_events": true, - "updated_at": "2024-11-13T11:49:47.368244Z", - "uploads": true, - "url_enrichment": true + "duration": "57.01ms", + "channel": { + "id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "type": "messaging", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "last_message_at": "0001-01-01T00:00:00Z", + "created_at": "2025-01-31T16:18:35.560277Z", + "updated_at": "2025-01-31T16:18:39.67828Z", + "created_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "frozen": false, + "disabled": false, + "members": [ + { + "user_id": "count_dooku", + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "birthland": "Serenno" }, - "created_at": "2025-01-15T00:14:09.719947Z", - "created_by": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "han_solo", + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "birthland": "Corellia" }, - "disabled": false, - "frozen": false, - "id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "last_message_at": "0001-01-01T00:00:00Z", - "member_count": 4, - "members": [ - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Serenno", - "blocked_user_ids": [], - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "language": "", - "last_active": "2025-01-14T21:47:15.722632Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-07-11T05:45:57.296628Z" - }, - "user_id": "count_dooku" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Corellia", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "language": "", - "last_active": "2025-01-14T16:41:15.818947Z", - "name": "Han Solo", - "online": false, - "role": "user", - "teams": [], - "updated_at": "2024-11-11T19:53:50.815436Z" - }, - "user_id": "han_solo" - }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "leia_organa", + "user": { + "id": "leia_organa", + "name": "Leia Organa", + "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", + "language": "ru", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:42:00.68335Z", + "updated_at": "2025-01-16T12:34:56.765249Z", + "banned": false, + "online": false, + "last_active": "2025-01-29T16:35:31.022088Z", + "blocked_user_ids": [ + + ], + "birthland": "Polis Massa", + "private_settings": { + "readReceipts": { + "enabled": false }, - { - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:13.737559Z", - "notifications_muted": false, - "role": "admin", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:13.737559Z", - "user": { - "banned": false, - "birthland": "Polis Massa", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:42:00.68335Z", - "id": "leia_organa", - "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", - "language": "ru", - "last_active": "2025-01-14T16:41:35.547087Z", - "name": "Leia Organa", - "online": false, - "private_settings": { - "readReceipts": { - "enabled": false - }, - "typingIndicators": { - "enabled": false - } - }, - "role": "admin", - "teams": [], - "updated_at": "2025-01-03T22:09:07.068442Z" - }, - "user_id": "leia_organa" + "typingIndicators": { + "enabled": false } - ], - "name": "Sync Mock Server", - "truncated_at": "2025-01-15T00:14:17.960338Z", - "truncated_by": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + } }, - "type": "messaging", - "updated_at": "2025-01-15T00:14:17.966563Z" - }, - "duration": "88.44ms", - "message": { - "attachments": [], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:17.960339Z", - "deleted_reply_count": 0, - "html": "Channel truncated
\n", - "id": "a90a50a8-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": {}, - "reaction_scores": {}, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "Channel truncated", - "type": "system", - "updated_at": "2025-01-15T00:14:17.960339Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "status": "member", + "created_at": "2025-01-31T16:18:37.521245Z", + "updated_at": "2025-01-31T16:18:37.521245Z", + "banned": false, + "shadow_banned": false, + "role": "admin", + "channel_role": "channel_member", + "notifications_muted": false + } + ], + "member_count": 4, + "config": { + "created_at": "2021-03-01T19:26:18.406502Z", + "updated_at": "2024-11-13T11:49:47.368244Z", + "name": "messaging", + "typing_events": true, + "read_events": true, + "connect_events": true, + "search": true, + "reactions": true, + "replies": true, + "quotes": true, + "mutes": true, + "uploads": true, + "url_enrichment": true, + "custom_events": true, + "push_notifications": true, + "reminders": false, + "mark_messages_pending": false, + "polls": true, + "message_retention": "infinite", + "max_message_length": 5000, + "automod": "AI", + "automod_behavior": "block", + "blocklist": "profanity_en_2020_v1", + "blocklist_behavior": "block", + "automod_thresholds": { + "explicit": { + "flag": 0.85, + "block": 0.9 + }, + "spam": { + "flag": 0.85, + "block": 0.9 + }, + "toxic": { + "flag": 0.85, + "block": 0.9 } - } + }, + "skip_last_msg_update_for_system_msgs": false, + "commands": [ + { + "name": "giphy", + "description": "Post a random gif to the channel", + "args": "[text]", + "set": "fun_set" + } + ] + }, + "truncated_at": "2025-01-31T16:18:39.672019Z", + "truncated_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "name": "Sync Mock Server" + }, + "message": { + "id": "af2b17fe-a3d3-47de-bd9b-92eb08ae9877", + "text": "Channel truncated", + "html": "Channel truncated
\n", + "type": "system", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "birthland": "Tatooine", + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}" + }, + "attachments": [ + + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:39.67202Z", + "updated_at": "2025-01-31T16:18:39.67202Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + } } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_unsplash_link.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_unsplash_link.json index 2cc5ac4533f..11db691bed6 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_unsplash_link.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_unsplash_link.json @@ -1,59 +1,66 @@ { - "duration": "943.89ms", - "message": { - "attachments": [ - { - "image_url": "https://images.unsplash.com/photo-1568574728383-06fca083883d?mark=https%3A%2F%2Fimages.unsplash.com%2Fopengraph%2Flogo.png&mark-w=64&mark-align=top%2Cleft&mark-pad=50&h=630&w=1200&crop=faces%2Cedges&blend-w=1&blend=000000&blend-mode=normal&blend-alpha=10&auto=format&fit=crop&q=60&ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzM2OTAwMDU3fA&ixlib=rb-4.0.3", - "og_scrape_url": "https://unsplash.com/photos/1_2d3MRbI9c", - "text": "Download this photo by Joao Branco on Unsplash", - "thumb_url": "https://images.unsplash.com/photo-1568574728383-06fca083883d?mark=https%3A%2F%2Fimages.unsplash.com%2Fopengraph%2Flogo.png&mark-w=64&mark-align=top%2Cleft&mark-pad=50&h=630&w=1200&crop=faces%2Cedges&blend-w=1&blend=000000&blend-mode=normal&blend-alpha=10&auto=format&fit=crop&q=60&ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzM2OTAwMDU3fA&ixlib=rb-4.0.3", - "title": "Photo by Joao Branco on Unsplash", - "title_link": "https://unsplash.com/photos/green-pine-tree-mountain-slope-scenery-1_2d3MRbI9c", - "type": "image" - } - ], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:17.735846Z", - "deleted_reply_count": 0, - "html": "https://unsplash.com/photos/1_2d3MRbI9c
\n", - "i18n": { - "en_text": "https://unsplash.com/photos/1_2d3MRbI9c", - "language": "en", - "ru_text": "https://unsplash.com/photos/1_2d3MRbI9c" - }, - "id": "a85cc8c0-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": {}, - "reaction_scores": {}, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "https://unsplash.com/photos/1_2d3MRbI9c", - "type": "regular", - "updated_at": "2025-01-15T00:14:17.735846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:16.701059448Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } - } + "message": { + "id": "6a3952aa-9e3e-4c1a-8f41-f6c8223b6b94", + "text": "https://unsplash.com/photos/1_2d3MRbI9c", + "html": "https://unsplash.com/photos/1_2d3MRbI9c
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "attachments": [ + { + "type": "image", + "title": "Photo by Joao Branco on Unsplash", + "title_link": "https://unsplash.com/photos/green-pine-tree-mountain-slope-scenery-1_2d3MRbI9c", + "text": "Download this photo by Joao Branco on Unsplash", + "image_url": "https://images.unsplash.com/photo-1568574728383-06fca083883d?mark=https%3A%2F%2Fimages.unsplash.com%2Fopengraph%2Flogo.png&mark-w=64&mark-align=top%2Cleft&mark-pad=50&h=630&w=1200&crop=faces%2Cedges&blend-w=1&blend=000000&blend-mode=normal&blend-alpha=10&auto=format&fit=crop&q=60&ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzM4MzMzNTI0fA&ixlib=rb-4.0.3", + "thumb_url": "https://images.unsplash.com/photo-1568574728383-06fca083883d?mark=https%3A%2F%2Fimages.unsplash.com%2Fopengraph%2Flogo.png&mark-w=64&mark-align=top%2Cleft&mark-pad=50&h=630&w=1200&crop=faces%2Cedges&blend-w=1&blend=000000&blend-mode=normal&blend-alpha=10&auto=format&fit=crop&q=60&ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzM4MzMzNTI0fA&ixlib=rb-4.0.3", + "og_scrape_url": "https://unsplash.com/photos/1_2d3MRbI9c" + } + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:39.023537Z", + "updated_at": "2025-01-31T16:18:39.023537Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "duration": "290.16ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_youtube_link.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_youtube_link.json index 76ca7068f19..de0d8883a02 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_youtube_link.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/http_youtube_link.json @@ -1,61 +1,68 @@ { - "duration": "1624.42ms", - "message": { - "attachments": [ - { - "asset_url": "https://www.youtube.com/watch?v=xOX7MsrbaPY", - "author_name": "YouTube", - "image_url": "https://i.ytimg.com/vi/xOX7MsrbaPY/mqdefault.jpg", - "og_scrape_url": "https://youtube.com/watch?v=xOX7MsrbaPY", - "text": "MotionScape is your SwiftUI animation's playground as a developer. You can see all animations and their parameters in effect with beautifully designed and handcrafted animation examples. Best of all: directly preview and export your settings as production-ready SwiftUI code that you can use in your apps as-is.\n\nSupercharge your apps with animations and get to know how to use them - with MotionScape!\n\nDownload MotionScape from the Mac AppStore: \nhttps://gstrm.io/motionscape-yt\n\nWebpage:\nhttps://getstream.github.io/motionscape-app/\n\nSwiftUI chat messaging:\nhttps://getstream.io/chat/sdk/swiftui/\n...", - "thumb_url": "https://i.ytimg.com/vi/xOX7MsrbaPY/mqdefault.jpg", - "title": "Introducing MotionScape: Prototype SwiftUI Animation Easings", - "title_link": "https://www.youtube.com/watch?v=xOX7MsrbaPY", - "type": "video" - } - ], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:16.597556Z", - "deleted_reply_count": 0, - "html": "https://youtube.com/watch?v=xOX7MsrbaPY
\n", - "i18n": { - "en_text": "https://youtube.com/watch?v=xOX7MsrbaPY", - "language": "en", - "ru_text": "https://youtube.com/watch?v=xOX7MsrbaPY" - }, - "id": "a7472b4c-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": {}, - "reaction_scores": {}, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "https://youtube.com/watch?v=xOX7MsrbaPY", - "type": "regular", - "updated_at": "2025-01-15T00:14:16.597556Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "blocked_user_ids": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "teams": [], - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } - } + "message": { + "id": "29b0f068-c354-463c-922b-b381913da5df", + "text": "https://youtube.com/watch?v=xOX7MsrbaPY", + "html": "https://youtube.com/watch?v=xOX7MsrbaPY
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "attachments": [ + { + "type": "video", + "author_name": "YouTube", + "title": "Introducing MotionScape: Prototype SwiftUI Animation Easings", + "title_link": "https://www.youtube.com/watch?v=xOX7MsrbaPY", + "text": "MotionScape is your SwiftUI animation's playground as a developer. You can see all animations and their parameters in effect with beautifully designed and handcrafted animation examples. Best of all: directly preview and export your settings as production-ready SwiftUI code that you can use in your apps as-is.\n\nSupercharge your apps with animations and get to know how to use them - with MotionScape!\n\nDownload MotionScape from the Mac AppStore: \nhttps://gstrm.io/motionscape-yt\n\nWebpage:\nhttps://getstream.github.io/motionscape-app/\n\nSwiftUI chat messaging:\nhttps://getstream.io/chat/sdk/swiftui/\n...", + "image_url": "https://i.ytimg.com/vi/xOX7MsrbaPY/mqdefault.jpg", + "thumb_url": "https://i.ytimg.com/vi/xOX7MsrbaPY/mqdefault.jpg", + "asset_url": "https://www.youtube.com/watch?v=xOX7MsrbaPY", + "og_scrape_url": "https://youtube.com/watch?v=xOX7MsrbaPY" + } + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:38.512552Z", + "updated_at": "2025-01-31T16:18:38.512552Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "duration": "280.08ms" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events.json index 045fbaf37a1..4644bfec1a0 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events.json @@ -1,24 +1,218 @@ { - "channel_id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "channel_type": "messaging", - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:11.51588868Z", - "type": "typing.start", - "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "type": "typing.start", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_type": "messaging", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": false + } + }, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "adcc46baccb0cc4b2dfd893f7762b6ee15b0f9d9e39c014286a501dcce558ec3", + "created_at": "2025-01-29T12:48:17.917988Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8d534aa2033befff9291da0e371b223b0f60a34ec0b498ad364259e20541d374", + "created_at": "2025-01-29T11:17:58.405065Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "52c03e3cd1477169d34772e1755a6009448b9115b3fe99fc6f50b4e8ded1a397", + "created_at": "2025-01-27T14:10:52.981213Z", + "disabled": true, + "disabled_reason": "Unregistered", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "27dc3cd279808ba179d46e04a2e95bc17a94062dfc91e1a317d7e39c314f65c6", + "created_at": "2025-01-27T09:26:50.733298Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "806dcda419b98288b170fcaee122e709197f8ae3c727329f1ea3ec2aed31419acd1028da485a462e39850aec933df018da4fb2d75f02f4a003f7749084d6b4a37818caffc674c41f947592f648155a93", + "created_at": "2025-01-27T07:18:18.62698Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca028a4646d58ef07166eaed2c5f068430fb9d7aa6b2bb94d53f8ce6261df2f932611aea12cad01a7b2cbc5169a4a0242c8d95c78ed5cde48bc139414ec63bbf696a56fb7c9b07218fa17bf8ba0aec", + "created_at": "2025-01-26T19:17:41.00587Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80647c152794bfb16ff75836d87e93363fe6827fd4a5673f84c839c65048fa9f8b4691a75f12ee974538b29858d8b6d1b935276ed594d657c754a84fb6229dd3b5881199598128dc1fae6a1e969d765b", + "created_at": "2025-01-26T18:56:24.995825Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "803fac504e3f9eca842b146b0d5dc358a258a83a1da25c53404f928eed4b607581a274499978e886f4923c1002d6ef33bd4b1374b0ede16c962dec4a562d53467ccf3c835c784544d07a181c56c886a5", + "created_at": "2025-01-24T15:23:31.160845Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8031fa3a733e7c218e91ad97413ed5640dbf934909f76ae7452fbd63c11eaa30825208b63462c29fe073410262afd99f39fa5f2d65d5bb834e6cff93e77e7fbeb7e63bdd3f2f6a91fa05dffe78335548", + "created_at": "2025-01-24T05:36:02.440032Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "d88cf79198e6489f4965d4855de57d12e33ba3d0d91c9490807c6f092f176c90", + "created_at": "2025-01-23T05:30:44.092337Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a866c1775d76e7884f3e27eae779ffe9a0fe2bdf8f8c5d9ae20ab1d3de4211d3dbfc689613a18ad21957a625ee60a00a2b811666d6a8b96ce62e17353626bb643bb9fa4062b6e6d6b8d9aea0371c79", + "created_at": "2025-01-22T04:43:11.923746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "805adb0dfe07ccf6c50df056ee5b0cca2ef67f1cee8045db9e2dec6dd48d6c9633b86635efd73673c72a3bc8ab84e3af4f85b7d1a8e377563272e7999eb16fcbfbced5fe9e26dc9e08db8973e0891418", + "created_at": "2025-01-21T03:06:34.117688Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "3eef457f5a0c9dd01c600ee142c1cd812034f603690c0d3e8c6c6c6c073ab075", + "created_at": "2025-01-15T13:18:37.405547Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9adb5efb25e5dd635103e3fa8475ccfb4806f262235015dcde5985fcddfc00db", + "created_at": "2025-01-15T07:59:32.530759Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9f4c91f42937f2f6991d772680e6d2f6f840e7eee3d4992328c3912e45365190", + "created_at": "2025-01-14T20:36:03.102001Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809065933d06e42d27179dfe7f24ef7c34e74c0898c184cc1de0abd791f0f9d2a1342ad140129c3a26ba7a4f86b3534358475d9964024ff373bc2c705bc2d999cbbe0402af60077fb7af6c1f73295bd7", + "created_at": "2025-01-14T17:54:05.295746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "2c0a2b1f6891af16b45df24c7b05b1598d414f64fae7c5ef3eb41d92b45bc275", + "created_at": "2025-01-13T06:09:35.973958Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "f1f43292dc972188ccf2bb5a2523342482280cd37e6e80540c7f41890b8f5868", + "created_at": "2025-01-13T02:06:21.211287Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80560b4f465af52f745b646beaeba703a1877ef6988eb06f38b5f023e6affb4f6a8d8c22123c53767d2f17fae4bfa1df218117400a0d175ffd2066bae361bab07d589bbfd9ae5e693e8af34476625f58", + "created_at": "2025-01-12T12:18:40.312161Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8009ae3cb1eb8350aa78dfe4539e5858be8c0de73b66cccdb2baff95b211f3c13c56c9e9e837c9a44af93b9b631d5db658bfed4d899ba8ee773898acf49956d5df2638f37191fa5262572b75108cc075", + "created_at": "2025-01-10T14:43:30.030261Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809155ab6e601835c405261f32a7046cc265d8899ffe5d3d484df422424101cba27d22e11531645c4c7d660a9b2c69641c9884622d08ba27b51458a03b67995e21791ba038a40f670fdcaa3a8f73403b", + "created_at": "2025-01-10T12:25:15.095949Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a416c7a38c0b0e5f4cdc67cc22db4429b1abf069719b5fd249e067bd40f39a93c9ae72186cd4dbe9ee3f7d4b75b0572f6fcb6fd61f1447924bb5049e49d64111494690ab89f39ae64f13828d692357", + "created_at": "2025-01-08T21:35:48.016721Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80677e1cd0e34efdaf88b76a3bb2ce7086c4c20853c3b1ca7c638a1da310ffd884491071d224cacd90e72a0116dcc1c3ebaab19a79e7eabb560f7ca21458945ff1a085e43a8b41d491f3eec625186aa1", + "created_at": "2025-01-08T16:07:56.454603Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d2897aafd7c4a6e382d80212ba469b5348669930fd34db0f8aae76f7059db340f7118963ef89d109480f2cb83679e7dd71a5766b764a8a546ff958f66f5ddbf17140658079e329f170bf9e47f68ae5", + "created_at": "2025-01-08T15:16:15.675842Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca9df3ad609fa3e61a033f403e3b6acb7039aaa58285061f5bd189d9a1659857216129e70e3fa267691c5b4ca20452aaaf683aa7d2f1aa98adaa8c162e8f8ef668da54070e79c3b8470add34e45b31", + "created_at": "2025-01-08T12:58:51.72573Z", + "user_id": "luke_skywalker" + } + ], + "invisible": false, + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "team": "test", + "type": "team" + }, + "created_at": "2025-01-31T16:18:36.200384029Z" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_channel.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_channel.json index fd03b4fe3ec..034bf7036d3 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_channel.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_channel.json @@ -1,222 +1,1079 @@ { - "channel": { - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "config": { - "automod": "AI", - "automod_behavior": "block", - "automod_thresholds": { - "explicit": { - "block": 0.9, - "flag": 0.85 - }, - "spam": { - "block": 0.9, - "flag": 0.85 - }, - "toxic": { - "block": 0.9, - "flag": 0.85 - } - }, - "blocklist": "profanity_en_2020_v1", - "blocklist_behavior": "block", - "commands": [ - { - "args": "[text]", - "description": "Post a random gif to the channel", - "name": "giphy", - "set": "fun_set" - } - ], - "connect_events": true, - "created_at": "2021-03-01T19:26:18.406502Z", - "custom_events": true, - "mark_messages_pending": false, - "max_message_length": 5000, - "message_retention": "infinite", - "mutes": true, - "name": "messaging", - "polls": true, - "push_notifications": true, - "quotes": true, - "reactions": true, - "read_events": true, - "reminders": false, - "replies": true, - "search": true, - "skip_last_msg_update_for_system_msgs": false, - "typing_events": true, - "updated_at": "2024-11-13T11:49:47.368244Z", - "uploads": true, - "url_enrichment": true - }, - "created_at": "2025-01-15T00:14:09.719947Z", - "created_by": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "disabled": false, - "frozen": false, - "id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "last_message_at": "2025-01-15T00:14:13.273479Z", - "member_count": 4, - "members": [ - { - "archived_at": null, - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "pinned_at": null, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Serenno", - "created_at": "2024-04-22T06:42:08.562992Z", - "id": "count_dooku", - "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", - "last_active": "2025-01-14T21:47:15.722632Z", - "last_engaged_at": "2025-01-14T21:47:16.595064Z", - "name": "Count Dooku", - "online": false, - "role": "user", - "updated_at": "2024-07-11T05:45:57.296628Z" - }, - "user_id": "count_dooku" - }, - { - "archived_at": null, - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "pinned_at": null, - "role": "member", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Corellia", - "created_at": "2024-04-04T09:18:11.060737Z", - "id": "han_solo", - "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", - "last_active": "2025-01-14T16:41:15.818947Z", - "last_engaged_at": "2025-01-14T06:28:42.316458Z", - "name": "Han Solo", - "online": false, - "role": "user", - "updated_at": "2024-11-11T19:53:50.815436Z" - }, - "user_id": "han_solo" - }, - { - "archived_at": null, - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:09.731846Z", - "notifications_muted": false, - "pinned_at": null, - "role": "owner", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:09.731846Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" - }, - { - "archived_at": null, - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:13.737559Z", - "notifications_muted": false, - "pinned_at": null, - "role": "admin", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:13.737559Z", - "user": { - "banned": false, - "birthland": "Polis Massa", - "created_at": "2024-04-04T09:42:00.68335Z", - "id": "leia_organa", - "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", - "language": "ru", - "last_active": "2025-01-14T16:41:35.547087Z", - "last_engaged_at": "2025-01-14T00:11:20.761428Z", - "name": "Leia Organa", - "online": false, - "private_settings": { - "readReceipts": { - "enabled": false - }, - "typingIndicators": { - "enabled": false - } - }, - "role": "admin", - "updated_at": "2025-01-03T22:09:07.068442Z" - }, - "user_id": "leia_organa" - } - ], - "name": "Sync Mock Server", - "type": "messaging", - "updated_at": "2025-01-15T00:14:09.719948Z" + "type": "channel.updated", + "created_at": "2025-01-31T16:18:37.542936957Z", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_last_message_at": "2025-01-31T16:18:37.094228Z", + "channel_member_count": 4, + "channel_type": "messaging", + "channel_id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel": { + "id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "type": "messaging", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "last_message_at": "2025-01-31T16:18:37.094228Z", + "created_at": "2025-01-31T16:18:35.560277Z", + "updated_at": "2025-01-31T16:18:35.560277Z", + "created_by": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": false + } + }, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "adcc46baccb0cc4b2dfd893f7762b6ee15b0f9d9e39c014286a501dcce558ec3", + "created_at": "2025-01-29T12:48:17.917988Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8d534aa2033befff9291da0e371b223b0f60a34ec0b498ad364259e20541d374", + "created_at": "2025-01-29T11:17:58.405065Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "52c03e3cd1477169d34772e1755a6009448b9115b3fe99fc6f50b4e8ded1a397", + "created_at": "2025-01-27T14:10:52.981213Z", + "disabled": true, + "disabled_reason": "Unregistered", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "27dc3cd279808ba179d46e04a2e95bc17a94062dfc91e1a317d7e39c314f65c6", + "created_at": "2025-01-27T09:26:50.733298Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "806dcda419b98288b170fcaee122e709197f8ae3c727329f1ea3ec2aed31419acd1028da485a462e39850aec933df018da4fb2d75f02f4a003f7749084d6b4a37818caffc674c41f947592f648155a93", + "created_at": "2025-01-27T07:18:18.62698Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca028a4646d58ef07166eaed2c5f068430fb9d7aa6b2bb94d53f8ce6261df2f932611aea12cad01a7b2cbc5169a4a0242c8d95c78ed5cde48bc139414ec63bbf696a56fb7c9b07218fa17bf8ba0aec", + "created_at": "2025-01-26T19:17:41.00587Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80647c152794bfb16ff75836d87e93363fe6827fd4a5673f84c839c65048fa9f8b4691a75f12ee974538b29858d8b6d1b935276ed594d657c754a84fb6229dd3b5881199598128dc1fae6a1e969d765b", + "created_at": "2025-01-26T18:56:24.995825Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "803fac504e3f9eca842b146b0d5dc358a258a83a1da25c53404f928eed4b607581a274499978e886f4923c1002d6ef33bd4b1374b0ede16c962dec4a562d53467ccf3c835c784544d07a181c56c886a5", + "created_at": "2025-01-24T15:23:31.160845Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8031fa3a733e7c218e91ad97413ed5640dbf934909f76ae7452fbd63c11eaa30825208b63462c29fe073410262afd99f39fa5f2d65d5bb834e6cff93e77e7fbeb7e63bdd3f2f6a91fa05dffe78335548", + "created_at": "2025-01-24T05:36:02.440032Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "d88cf79198e6489f4965d4855de57d12e33ba3d0d91c9490807c6f092f176c90", + "created_at": "2025-01-23T05:30:44.092337Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a866c1775d76e7884f3e27eae779ffe9a0fe2bdf8f8c5d9ae20ab1d3de4211d3dbfc689613a18ad21957a625ee60a00a2b811666d6a8b96ce62e17353626bb643bb9fa4062b6e6d6b8d9aea0371c79", + "created_at": "2025-01-22T04:43:11.923746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "805adb0dfe07ccf6c50df056ee5b0cca2ef67f1cee8045db9e2dec6dd48d6c9633b86635efd73673c72a3bc8ab84e3af4f85b7d1a8e377563272e7999eb16fcbfbced5fe9e26dc9e08db8973e0891418", + "created_at": "2025-01-21T03:06:34.117688Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "3eef457f5a0c9dd01c600ee142c1cd812034f603690c0d3e8c6c6c6c073ab075", + "created_at": "2025-01-15T13:18:37.405547Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9adb5efb25e5dd635103e3fa8475ccfb4806f262235015dcde5985fcddfc00db", + "created_at": "2025-01-15T07:59:32.530759Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9f4c91f42937f2f6991d772680e6d2f6f840e7eee3d4992328c3912e45365190", + "created_at": "2025-01-14T20:36:03.102001Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809065933d06e42d27179dfe7f24ef7c34e74c0898c184cc1de0abd791f0f9d2a1342ad140129c3a26ba7a4f86b3534358475d9964024ff373bc2c705bc2d999cbbe0402af60077fb7af6c1f73295bd7", + "created_at": "2025-01-14T17:54:05.295746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "2c0a2b1f6891af16b45df24c7b05b1598d414f64fae7c5ef3eb41d92b45bc275", + "created_at": "2025-01-13T06:09:35.973958Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "f1f43292dc972188ccf2bb5a2523342482280cd37e6e80540c7f41890b8f5868", + "created_at": "2025-01-13T02:06:21.211287Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80560b4f465af52f745b646beaeba703a1877ef6988eb06f38b5f023e6affb4f6a8d8c22123c53767d2f17fae4bfa1df218117400a0d175ffd2066bae361bab07d589bbfd9ae5e693e8af34476625f58", + "created_at": "2025-01-12T12:18:40.312161Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8009ae3cb1eb8350aa78dfe4539e5858be8c0de73b66cccdb2baff95b211f3c13c56c9e9e837c9a44af93b9b631d5db658bfed4d899ba8ee773898acf49956d5df2638f37191fa5262572b75108cc075", + "created_at": "2025-01-10T14:43:30.030261Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809155ab6e601835c405261f32a7046cc265d8899ffe5d3d484df422424101cba27d22e11531645c4c7d660a9b2c69641c9884622d08ba27b51458a03b67995e21791ba038a40f670fdcaa3a8f73403b", + "created_at": "2025-01-10T12:25:15.095949Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a416c7a38c0b0e5f4cdc67cc22db4429b1abf069719b5fd249e067bd40f39a93c9ae72186cd4dbe9ee3f7d4b75b0572f6fcb6fd61f1447924bb5049e49d64111494690ab89f39ae64f13828d692357", + "created_at": "2025-01-08T21:35:48.016721Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80677e1cd0e34efdaf88b76a3bb2ce7086c4c20853c3b1ca7c638a1da310ffd884491071d224cacd90e72a0116dcc1c3ebaab19a79e7eabb560f7ca21458945ff1a085e43a8b41d491f3eec625186aa1", + "created_at": "2025-01-08T16:07:56.454603Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d2897aafd7c4a6e382d80212ba469b5348669930fd34db0f8aae76f7059db340f7118963ef89d109480f2cb83679e7dd71a5766b764a8a546ff958f66f5ddbf17140658079e329f170bf9e47f68ae5", + "created_at": "2025-01-08T15:16:15.675842Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca9df3ad609fa3e61a033f403e3b6acb7039aaa58285061f5bd189d9a1659857216129e70e3fa267691c5b4ca20452aaaf683aa7d2f1aa98adaa8c162e8f8ef668da54070e79c3b8470add34e45b31", + "created_at": "2025-01-08T12:58:51.72573Z", + "user_id": "luke_skywalker" + } + ], + "invisible": false, + "birthland": "Tatooine", + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}" }, - "channel_id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "channel_last_message_at": "2025-01-15T00:14:13.273479Z", - "channel_type": "messaging", - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.760916108Z", - "type": "channel.updated", - "user": { + "frozen": false, + "disabled": false, + "members": [ + { + "user_id": "count_dooku", + "user": { + "id": "count_dooku", + "name": "Count Dooku", + "image": "https://vignette.wikia.nocookie.net/starwars/images/b/b8/Dooku_Headshot.jpg", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-22T06:42:08.562992Z", + "updated_at": "2024-07-11T05:45:57.296628Z", + "banned": false, + "online": false, + "last_active": "2025-01-14T21:47:15.722632Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": true + } + }, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "5ee2184dcd7c5ebbf17a0b8b820e7f70397adc2529a75a92a0d0817d8c49cbfb", + "created_at": "2025-01-14T21:47:18.084094Z", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "3b3a27f98aea406a49063e2125ae166b3f63b286a208c2b0dbb2b78947dedb4e", + "created_at": "2024-12-03T08:41:04.105631Z", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "946b811a31f27fcc38186e51fa0e7b5ce37887ab26ffea96395dcb72b469bef7", + "created_at": "2024-11-26T18:14:33.610863Z", + "disabled": true, + "disabled_reason": "DeviceTokenNotForTopic", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8f5bb77dd2a862b4312af6ba284df39fd50d77896e096fe35813a0a3bae14c14", + "created_at": "2024-11-21T22:22:25.955984Z", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d1e3e76b250d7d63364f2d85bc47850655b95e9bb3d082a1eb2b613466c1c4b593f6ebd1957edfb00046bd9db7ae3f56a0fe52e62da55e69e328361a1279fb6bb6b416eb2ebadca40ee7d5a8064931", + "created_at": "2024-11-18T12:05:39.54754Z", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "a07e4a466e6a4b93367cac7782051521d3235a54f6caab8fb4058d7ca0b5b9f3", + "created_at": "2024-11-07T07:15:14.198046Z", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9dc9815891580982a1381fce4bdb7ba26bb2b0744cbddaa0fe3c0fd56e96f28b", + "created_at": "2024-09-04T20:41:14.087342Z", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "ece3bcc1a83e0e184041d4b538550365cc391a601997819a32cf3c62c698e7f8", + "created_at": "2024-08-08T20:32:12.662128Z", + "disabled": true, + "disabled_reason": "DeviceTokenNotForTopic", + "user_id": "count_dooku" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "801f28973e47ebdd8afcb814c8af30b95d44bdfe46253281a0bc7ad45737e484b714240ac6ac132f5f64223e92a3a135e3b7f3017ae819c47c03fc082f7d9829333d5c2dc72ca8f9d78925f152abde26", + "created_at": "2024-07-11T05:45:57.533093Z", + "user_id": "count_dooku" + } + ], + "invisible": false, + "birthland": "Serenno" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "han_solo", + "user": { + "id": "han_solo", + "name": "Han Solo", + "image": "https://vignette.wikia.nocookie.net/starwars/images/e/e2/TFAHanSolo.png", + "language": "", + "role": "user", + "teams": [ + + ], + "created_at": "2024-04-04T09:18:11.060737Z", + "updated_at": "2025-01-16T12:35:13.266041Z", + "banned": false, + "online": false, + "last_active": "2025-01-31T14:12:07.724208Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": true + } + }, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "baf4b773dce673f8798202e71525c4bd737d8516351a3b255eb96ce044401a0a", + "created_at": "2025-01-31T14:10:34.827212Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80562365fd4558a3f35d7242fe7f75f55d343e3c08793327b95c2a66bed62dd580e03ea87ee2670e045188cc002ce0c474cc2be00aac2e41417566303513d01c2f9b08fbe20a875423706773c938a276", + "created_at": "2025-01-30T10:34:15.063447Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "afb6c2ecd6fafc6d2c9fa30a1204fd15a2192ddeea2503dece31a5aee361e7c7", + "created_at": "2025-01-28T22:01:52.754315Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "5cf71106a7f5759fcfbe0e0eab99fc423e7bf61b17519d69369cd55bd5b0896a", + "created_at": "2025-01-28T13:21:44.725776Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "ba5c9a15da015e60009b8b18a022796ff3f1443e32c5bc6eb6582f37c83a279e", + "created_at": "2025-01-24T12:28:25.593919Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "4db7f6b8a1741a63ab34225fe973658f7a4bf5e51980009ea861b936ec98303d", + "created_at": "2025-01-19T20:33:43.240521Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "c0fd9f37a0a660d02f19b26df4c29c9519115010b6fcc6e3c8c98bd9c40f0782", + "created_at": "2025-01-16T02:08:16.720431Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "66af1dcb8df0727454c1a7544baa2cd41f5af0ef4c0400527c6c20cac5c8794d", + "created_at": "2025-01-12T12:06:15.167679Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "19caa4c1fd038ebfd2ade42c858bca2e69b7fbbb34514ed23d93f21f3ef134fe", + "created_at": "2025-01-11T11:27:14.812828Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a189064a8e5bf1a5a12daba9c8309f359455a441fbec84c213b9e684b481b7a9aa75e3d1e8aada6c4cc683b262f436f5d48f9759370dbf463c9b85fc78dd5bb6a007b5751ea4eacd2a118305d90b89", + "created_at": "2025-01-09T16:09:44.165444Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "bc36105667f3570260bcbd736f73dbd3fb3342c35deb95dd9eaa249d96fe8d8a", + "created_at": "2025-01-08T15:54:32.363611Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "2cf13811d07d40f91348d07ab0556e5c83ba72269a12a26ad24f50138e7c741d", + "created_at": "2025-01-05T18:19:55.143689Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80978cff32cde2de16878ab7fae0bb7043ce21374ec5f08d92578616f2ab07b136219040b050e3b9133c8826e0f98d8b4fe10ae89ae5580ea733782c326b0d6abf7e95ba29fc4b02de069dac755874f4", + "created_at": "2024-12-27T09:59:26.50571Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "4b8b44d076dca7890d5dafd2401c376be147c887e909d206ad51c3f50f26cb9d", + "created_at": "2024-12-21T22:33:14.608961Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "b31ae9a7d13f81858bfb7a702d121bccaaf51dd0a1fa12126efc8a33def0d402", + "created_at": "2024-12-19T20:29:50.716431Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "5f8f5cbda69dfa8bc1158028f49e1daaf842124b9b5ef4b17a05569df8dad695", + "created_at": "2024-12-18T14:27:58.298805Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "978140014aac262974708a794269b73b90018fd72d533e9261dd73ffdafabb85", + "created_at": "2024-12-13T01:46:43.980788Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "b7b7c7b2aa269e61b1dff22a79540eeed96af4bd32c94832aeae48935ae21c13", + "created_at": "2024-12-06T23:32:45.628448Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "7523c55f366252b9091cd8edc0fc94c09cad64db5ecf132fb12031af97cc7b92", + "created_at": "2024-12-03T18:22:28.977342Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "0d4faddf6be9780c5cb1e13825768308319c150ccab602a2a8528c2333cc27ef", + "created_at": "2024-12-03T11:38:29.165403Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "ace2025f5fc45a912a47ebebed482537ea70680cf2471f75cfae25b07de735a6", + "created_at": "2024-11-26T18:51:55.48197Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "ed4ffeeccf2e779b162b27135cab28916d2a9a907c0401d00b032c0bcc7432d1", + "created_at": "2024-11-26T17:17:31.601203Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "802d5502038579bc88e1842e7adc19317c656fbb427024e9d09b2fccc3c761c0975082e99bff525721300c64af0500852f342e5b40af9c1fb581013a10c8090ce3a2fa4be55b4db96f5c822d40802321", + "created_at": "2024-11-11T15:05:13.174817Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "308135f38a9df34059a827bcc671fe89b81b3ae8d9fa7b90bc2dfeacc896d9fe", + "created_at": "2024-11-11T07:31:34.464374Z", + "user_id": "han_solo" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "ed8267ab036e152959b891f11ce28d119d3ae9a36d49a3da9d75106e753709c1", + "created_at": "2024-11-05T13:03:40.481073Z", + "user_id": "han_solo" + } + ], + "invisible": false, + "birthland": "Corellia" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "member", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "luke_skywalker", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": true + } + }, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "adcc46baccb0cc4b2dfd893f7762b6ee15b0f9d9e39c014286a501dcce558ec3", + "created_at": "2025-01-29T12:48:17.917988Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8d534aa2033befff9291da0e371b223b0f60a34ec0b498ad364259e20541d374", + "created_at": "2025-01-29T11:17:58.405065Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "52c03e3cd1477169d34772e1755a6009448b9115b3fe99fc6f50b4e8ded1a397", + "created_at": "2025-01-27T14:10:52.981213Z", + "disabled": true, + "disabled_reason": "Unregistered", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "27dc3cd279808ba179d46e04a2e95bc17a94062dfc91e1a317d7e39c314f65c6", + "created_at": "2025-01-27T09:26:50.733298Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "806dcda419b98288b170fcaee122e709197f8ae3c727329f1ea3ec2aed31419acd1028da485a462e39850aec933df018da4fb2d75f02f4a003f7749084d6b4a37818caffc674c41f947592f648155a93", + "created_at": "2025-01-27T07:18:18.62698Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca028a4646d58ef07166eaed2c5f068430fb9d7aa6b2bb94d53f8ce6261df2f932611aea12cad01a7b2cbc5169a4a0242c8d95c78ed5cde48bc139414ec63bbf696a56fb7c9b07218fa17bf8ba0aec", + "created_at": "2025-01-26T19:17:41.00587Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80647c152794bfb16ff75836d87e93363fe6827fd4a5673f84c839c65048fa9f8b4691a75f12ee974538b29858d8b6d1b935276ed594d657c754a84fb6229dd3b5881199598128dc1fae6a1e969d765b", + "created_at": "2025-01-26T18:56:24.995825Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "803fac504e3f9eca842b146b0d5dc358a258a83a1da25c53404f928eed4b607581a274499978e886f4923c1002d6ef33bd4b1374b0ede16c962dec4a562d53467ccf3c835c784544d07a181c56c886a5", + "created_at": "2025-01-24T15:23:31.160845Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8031fa3a733e7c218e91ad97413ed5640dbf934909f76ae7452fbd63c11eaa30825208b63462c29fe073410262afd99f39fa5f2d65d5bb834e6cff93e77e7fbeb7e63bdd3f2f6a91fa05dffe78335548", + "created_at": "2025-01-24T05:36:02.440032Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "d88cf79198e6489f4965d4855de57d12e33ba3d0d91c9490807c6f092f176c90", + "created_at": "2025-01-23T05:30:44.092337Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a866c1775d76e7884f3e27eae779ffe9a0fe2bdf8f8c5d9ae20ab1d3de4211d3dbfc689613a18ad21957a625ee60a00a2b811666d6a8b96ce62e17353626bb643bb9fa4062b6e6d6b8d9aea0371c79", + "created_at": "2025-01-22T04:43:11.923746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "805adb0dfe07ccf6c50df056ee5b0cca2ef67f1cee8045db9e2dec6dd48d6c9633b86635efd73673c72a3bc8ab84e3af4f85b7d1a8e377563272e7999eb16fcbfbced5fe9e26dc9e08db8973e0891418", + "created_at": "2025-01-21T03:06:34.117688Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "3eef457f5a0c9dd01c600ee142c1cd812034f603690c0d3e8c6c6c6c073ab075", + "created_at": "2025-01-15T13:18:37.405547Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9adb5efb25e5dd635103e3fa8475ccfb4806f262235015dcde5985fcddfc00db", + "created_at": "2025-01-15T07:59:32.530759Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9f4c91f42937f2f6991d772680e6d2f6f840e7eee3d4992328c3912e45365190", + "created_at": "2025-01-14T20:36:03.102001Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809065933d06e42d27179dfe7f24ef7c34e74c0898c184cc1de0abd791f0f9d2a1342ad140129c3a26ba7a4f86b3534358475d9964024ff373bc2c705bc2d999cbbe0402af60077fb7af6c1f73295bd7", + "created_at": "2025-01-14T17:54:05.295746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "2c0a2b1f6891af16b45df24c7b05b1598d414f64fae7c5ef3eb41d92b45bc275", + "created_at": "2025-01-13T06:09:35.973958Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "f1f43292dc972188ccf2bb5a2523342482280cd37e6e80540c7f41890b8f5868", + "created_at": "2025-01-13T02:06:21.211287Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80560b4f465af52f745b646beaeba703a1877ef6988eb06f38b5f023e6affb4f6a8d8c22123c53767d2f17fae4bfa1df218117400a0d175ffd2066bae361bab07d589bbfd9ae5e693e8af34476625f58", + "created_at": "2025-01-12T12:18:40.312161Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8009ae3cb1eb8350aa78dfe4539e5858be8c0de73b66cccdb2baff95b211f3c13c56c9e9e837c9a44af93b9b631d5db658bfed4d899ba8ee773898acf49956d5df2638f37191fa5262572b75108cc075", + "created_at": "2025-01-10T14:43:30.030261Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809155ab6e601835c405261f32a7046cc265d8899ffe5d3d484df422424101cba27d22e11531645c4c7d660a9b2c69641c9884622d08ba27b51458a03b67995e21791ba038a40f670fdcaa3a8f73403b", + "created_at": "2025-01-10T12:25:15.095949Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a416c7a38c0b0e5f4cdc67cc22db4429b1abf069719b5fd249e067bd40f39a93c9ae72186cd4dbe9ee3f7d4b75b0572f6fcb6fd61f1447924bb5049e49d64111494690ab89f39ae64f13828d692357", + "created_at": "2025-01-08T21:35:48.016721Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80677e1cd0e34efdaf88b76a3bb2ce7086c4c20853c3b1ca7c638a1da310ffd884491071d224cacd90e72a0116dcc1c3ebaab19a79e7eabb560f7ca21458945ff1a085e43a8b41d491f3eec625186aa1", + "created_at": "2025-01-08T16:07:56.454603Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d2897aafd7c4a6e382d80212ba469b5348669930fd34db0f8aae76f7059db340f7118963ef89d109480f2cb83679e7dd71a5766b764a8a546ff958f66f5ddbf17140658079e329f170bf9e47f68ae5", + "created_at": "2025-01-08T15:16:15.675842Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca9df3ad609fa3e61a033f403e3b6acb7039aaa58285061f5bd189d9a1659857216129e70e3fa267691c5b4ca20452aaaf683aa7d2f1aa98adaa8c162e8f8ef668da54070e79c3b8470add34e45b31", + "created_at": "2025-01-08T12:58:51.72573Z", + "user_id": "luke_skywalker" + } + ], + "invisible": false, + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "status": "member", + "created_at": "2025-01-31T16:18:35.564453Z", + "updated_at": "2025-01-31T16:18:35.564453Z", + "banned": false, + "shadow_banned": false, + "role": "owner", + "channel_role": "channel_member", + "notifications_muted": false + }, + { + "user_id": "leia_organa", + "user": { + "id": "leia_organa", + "name": "Leia Organa", + "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", + "language": "ru", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:42:00.68335Z", + "updated_at": "2025-01-16T12:34:56.765249Z", + "banned": false, + "online": false, + "last_active": "2025-01-29T16:35:31.022088Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": true + } + }, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "06f2e16cacf2bc6c1917d945e3aa875d2c0faa6cd1a379f7c2c28b9b61269bd2", + "created_at": "2025-01-25T23:50:24.74497Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80902ac37a00a72af2fcebb5fa7db31603af4ed96681d8c356409dc391ce5d0a", + "created_at": "2025-01-24T05:28:13.061448Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d7928379a90a4e06623ff511036f50df5fe140ae14ab04c4998662eaa42e607b960280e4a24dfd3ef49b360f7837c8b493e463bd2d6b1f467bcad9a70a5f3bd3250b1196a0938e63001952d68f75a6", + "created_at": "2025-01-23T15:22:37.89033Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d2480357faab5bfb5328e24089a3d3a9c51d7baf593089a8cff3779238135973c3e7a2fa015b857a9e022da1f30d3a1fd081243aa8f92e527428e9d63fbef4f0bbcb28016f756e1aeaaf60d8923ce4", + "created_at": "2025-01-17T16:26:56.459178Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80c28b1312d1e9123e63a3451441c59c17742260f08a627897c26520178e55ddac30fb3cfb30725e2f595983f333edea82b5377b3032c45b7483c1b0876f5ba7b46461edb563bd30d26e7adbe8a3b615", + "created_at": "2025-01-15T15:38:17.46356Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "c72625f7d8d3cea767f3a3343c6308a66b191532e2f01b5fc36e7ba1ea5ad1bb", + "created_at": "2025-01-02T17:25:19.278525Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "fd0aaea9b4ba4c8e23a6aefa1fba3a500fd617d9cf8dcfc4740837e030d595ea", + "created_at": "2024-12-27T21:25:50.077757Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "7806d403ee3740e98fc519a123a9450dbd9d90b13229bff5dbe7a1d5825d2fdf", + "created_at": "2024-12-27T17:32:18.338986Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80bfc09ef7858948e403a0db71cb1a3f3e6f284fece7a4c6c751a02f25c66bf95d89362ca55c988102aeee876e91c150779c4dcdc206e11124a2df77d3c843ed75dbb42d7bb0b0724007b0d1d6011a09", + "created_at": "2024-12-26T14:26:34.216526Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8046a0302185632c48b4a9b312b453041fa7744f6fde791d5720039d633e22b3d037fb0db7fe0c4ca520a46e112c9403ac5350072726322578f58b749f5a1cd8be46bda14c46fdebc5649004f6987dc4", + "created_at": "2024-12-23T10:29:22.317477Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8c0b4d893e483b29c0fb6714c8ae577ae4f108b635b3503149c1d3adbcbf76bb", + "created_at": "2024-12-20T08:22:37.835949Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "fcdb0c76c82e88adc20df9894884ed6d6eb72458abb6e11b280fedb13ab46273", + "created_at": "2024-12-17T22:21:33.57912Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "805fba5a120692420663f90323002693d68dad91135f53f009acb9498110fb773f81800a8079831cecdf446736e59ecac0d12b7966ff8be00e8456f67cc98d32e3108b8f1e4fbd00c2988b1f21f2392d", + "created_at": "2024-12-17T16:22:58.289165Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "a087b19d26073575b4bbb498a615c47b011a6ff82a463cc5115c47986be8b012", + "created_at": "2024-12-16T00:47:44.886922Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "b58dd549e608c3e824e3ea003093fc5ac64385fcf27e83bd817ba57189c312a5", + "created_at": "2024-12-15T00:36:12.083564Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8db23a998bc60bf451c6eb293d52d1bf730244a1d47285a44ca098f4fb4a0137", + "created_at": "2024-12-09T00:15:31.29602Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "df25ba5be202c91abcc286425dd009d0ef91717d029b62d80fe99bb11f652b4d", + "created_at": "2024-12-06T10:24:35.549968Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80350a46b24fa6840207d47beb32d3d1ecf2779aefb27e117f011b25229ceb3e08f5393d8d0508e4be5eb0c1276b97686fdfeb4f6900873c97e8881b088cae9d5e7ff3481abe08c014328795aa71fb01", + "created_at": "2024-11-27T16:17:30.704315Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8089476c99621fd0ee82c8df88a4ea4f764c2b146f731ea0ed444da40ed9aa624ab41d57eb08ed5d443662f5827857451049623a763566bd1aac1eefc7f0f12aac7d88e0bc465e2cc758689fc0def34a", + "created_at": "2024-11-26T16:55:38.139674Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "0b5f6a7e4ff8d32af68f850f75b1a4f4e0eaba2eeb437dad656b6e3c6aa2799d", + "created_at": "2024-11-25T17:52:51.842437Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "efd60f277700c979ecd1a3ebf6dbeda0ce1e9178d353c577b06ba9077fe5d421", + "created_at": "2024-11-14T01:59:44.869194Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8060ebab3e48f5ca984a9673ab0decdeb67f9359925f57a73930160d9f8ee24acca80c515409ab89f73fbc1ef27f092faf1363b9806b754592fd4a93e1b6fdcf2802feea16aec889aaef14574d1dd076", + "created_at": "2024-11-12T11:48:44.01663Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "3fb4736e2bc02e51f13e403adef98fb1301f18e71b9825bf0aa6fef6666c2112", + "created_at": "2024-11-05T16:33:34.780594Z", + "user_id": "leia_organa" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80b04f87691de56ae755b28cddb3eee63ef786f3ed952f53632a14f1af72053ee01e026918a71ad7518de5ae73910c3528d00e465d78d1702d9e79a620b207c60c337a938c4c364e5e5b8f3963acefb4", + "created_at": "2024-10-26T18:09:15.629886Z", + "user_id": "leia_organa" + } + ], + "invisible": false, + "birthland": "Polis Massa", + "private_settings": { + "readReceipts": { + "enabled": false + }, + "typingIndicators": { + "enabled": false + } + } + }, + "status": "member", + "created_at": "2025-01-31T16:18:37.521245Z", + "updated_at": "2025-01-31T16:18:37.521245Z", + "banned": false, + "shadow_banned": false, "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "channel_role": "channel_member", + "notifications_muted": false + } + ], + "member_count": 4, + "config": { + "created_at": "2021-03-01T19:26:18.406502Z", + "updated_at": "2024-11-13T11:49:47.368244Z", + "name": "messaging", + "typing_events": true, + "read_events": true, + "connect_events": true, + "search": true, + "reactions": true, + "replies": true, + "quotes": true, + "mutes": true, + "uploads": true, + "url_enrichment": true, + "custom_events": true, + "push_notifications": true, + "reminders": false, + "mark_messages_pending": false, + "polls": true, + "message_retention": "infinite", + "max_message_length": 5000, + "automod": "AI", + "automod_behavior": "block", + "blocklist": "profanity_en_2020_v1", + "blocklist_behavior": "block", + "automod_thresholds": { + "explicit": { + "flag": 0.85, + "block": 0.9 + }, + "spam": { + "flag": 0.85, + "block": 0.9 + }, + "toxic": { + "flag": 0.85, + "block": 0.9 + } + }, + "skip_last_msg_update_for_system_msgs": false, + "commands": [ + { + "name": "giphy", + "description": "Post a random gif to the channel", + "args": "[text]", + "set": "fun_set" + } + ] + }, + "name": "Sync Mock Server" + }, + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:15:56.152156879Z", + "blocked_user_ids": [ + + ], + "birthland": "Tatooine", + "privacy_settings": { + "read_receipts": { + "enabled": false + }, + "typing_indicators": { + "enabled": false + } + }, + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}" + } } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_member.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_member.json index 71c1c951201..4cad347181c 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_member.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_events_member.json @@ -1,65 +1,65 @@ { - "channel_id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "channel_last_message_at": "2025-01-15T00:14:13.273479Z", - "channel_type": "messaging", - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.747329442Z", - "member": { - "archived_at": null, - "banned": false, - "channel_role": "channel_member", - "created_at": "2025-01-15T00:14:13.737559Z", - "notifications_muted": false, - "pinned_at": null, - "role": "admin", - "shadow_banned": false, - "status": "member", - "updated_at": "2025-01-15T00:14:13.737559Z", - "user": { - "banned": false, - "birthland": "Polis Massa", - "created_at": "2024-04-04T09:42:00.68335Z", - "id": "leia_organa", - "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", - "language": "ru", - "last_active": "2025-01-14T16:41:35.547087Z", - "last_engaged_at": "2025-01-14T00:11:20.761428Z", - "name": "Leia Organa", - "online": false, - "private_settings": { - "readReceipts": { - "enabled": false - }, - "typingIndicators": { - "enabled": false - } - }, - "role": "admin", - "updated_at": "2025-01-03T22:09:07.068442Z" - }, - "user_id": "leia_organa" - }, - "type": "member.added", + "type": "member.added", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_type": "messaging", + "member": { + "user_id": "leia_organa", "user": { - "banned": false, - "birthland": "Polis Massa", - "created_at": "2024-04-04T09:42:00.68335Z", - "id": "leia_organa", - "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", - "language": "ru", - "last_active": "2025-01-14T16:41:35.547087Z", - "last_engaged_at": "2025-01-14T00:11:20.761428Z", - "name": "Leia Organa", - "online": false, - "private_settings": { - "readReceipts": { - "enabled": false - }, - "typingIndicators": { - "enabled": false - } + "id": "leia_organa", + "role": "admin", + "created_at": "2024-04-04T09:42:00.68335Z", + "updated_at": "2025-01-16T12:34:56.765249Z", + "last_active": "2025-01-29T16:35:31.022088Z", + "last_engaged_at": "2025-01-29T01:28:41.520256Z", + "banned": false, + "online": false, + "language": "ru", + "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", + "birthland": "Polis Massa", + "private_settings": { + "readReceipts": { + "enabled": false }, - "role": "admin", - "updated_at": "2025-01-03T22:09:07.068442Z" + "typingIndicators": { + "enabled": false + } + }, + "name": "Leia Organa" + }, + "status": "member", + "created_at": "2025-01-31T16:18:37.521245Z", + "updated_at": "2025-01-31T16:18:37.521245Z", + "banned": false, + "shadow_banned": false, + "archived_at": null, + "pinned_at": null, + "role": "admin", + "channel_role": "channel_member", + "notifications_muted": false + }, + "user": { + "id": "leia_organa", + "role": "admin", + "created_at": "2024-04-04T09:42:00.68335Z", + "updated_at": "2025-01-16T12:34:56.765249Z", + "last_active": "2025-01-29T16:35:31.022088Z", + "last_engaged_at": "2025-01-29T01:28:41.520256Z", + "banned": false, + "online": false, + "language": "ru", + "name": "Leia Organa", + "image": "https://vignette.wikia.nocookie.net/starwars/images/f/fc/Leia_Organa_TLJ.png", + "birthland": "Polis Massa", + "private_settings": { + "readReceipts": { + "enabled": false + }, + "typingIndicators": { + "enabled": false + } } + }, + "channel_last_message_at": "2025-01-31T16:18:37.094228Z", + "created_at": "2025-01-31T16:18:37.531605452Z" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_health_check.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_health_check.json index 1466d0bd5f9..88357c65958 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_health_check.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_health_check.json @@ -1,39 +1,47 @@ { - "cid": "*", - "connection_id": "6777add6-0a15-284e-0200-000000001925", - "created_at": "2025-01-15T00:14:08.91510528Z", - "me": { - "banned": false, - "birthland": "Tatooine", - "channel_mutes": [], - "created_at": "2024-04-04T09:26:11.805899Z", - "devices": [], - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "invisible": false, - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "mutes": [], - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "privacy_settings": { - "read_receipts": { - "enabled": true - }, - "typing_indicators": { - "enabled": true - } - }, - "role": "admin", - "team": "test", - "teams": [], - "total_unread_count": 0, - "type": "team", - "unread_channels": 0, - "unread_count": 0, - "unread_threads": 0, - "updated_at": "2025-01-05T17:08:30.981929Z" + "connection_id": "679c8249-0a15-3bf6-0200-0000000001c0", + "me": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:18:35.2853414Z", + "privacy_settings": { + "typing_indicators": { + "enabled": true + }, + "read_receipts": { + "enabled": false + } }, - "type": "health.check" + "devices": [ + + ], + "invisible": false, + "mutes": [ + + ], + "channel_mutes": [ + + ], + "unread_count": 0, + "total_unread_count": 0, + "unread_channels": 0, + "unread_threads": 0, + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" + }, + "cid": "*", + "type": "health.check", + "created_at": "2025-01-31T16:18:35.302174503Z" } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_message.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_message.json index f15a6e558b4..0f540037903 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_message.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_message.json @@ -1,71 +1,283 @@ { - "channel_id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "channel_last_message_at": "2025-01-15T00:14:13.273479Z", - "channel_type": "messaging", - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.296811079Z", - "message": { - "attachments": [], - "before_message_send_failed": true, - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.273479Z", - "deleted_reply_count": 0, - "html": "Test
\n", - "id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": {}, - "reaction_groups": null, - "reaction_scores": {}, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "Test", - "type": "regular", - "updated_at": "2025-01-15T00:14:13.273479Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "type": "message.new", + "created_at": "2025-01-31T16:18:37.112003835Z", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_last_message_at": "2025-01-31T16:18:37.094228Z", + "channel_member_count": 3, + "channel_custom": { + "name": "Sync Mock Server" + }, + "channel_type": "messaging", + "channel_id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "message_id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "message": { + "id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "text": "Test", + "html": "Test
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:17:53.97317831Z", + "blocked_user_ids": [ + + ], + "shadow_banned": false, + "devices": [ + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "adcc46baccb0cc4b2dfd893f7762b6ee15b0f9d9e39c014286a501dcce558ec3", + "created_at": "2025-01-29T12:48:17.917988Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8d534aa2033befff9291da0e371b223b0f60a34ec0b498ad364259e20541d374", + "created_at": "2025-01-29T11:17:58.405065Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "52c03e3cd1477169d34772e1755a6009448b9115b3fe99fc6f50b4e8ded1a397", + "created_at": "2025-01-27T14:10:52.981213Z", + "disabled": true, + "disabled_reason": "Unregistered", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "27dc3cd279808ba179d46e04a2e95bc17a94062dfc91e1a317d7e39c314f65c6", + "created_at": "2025-01-27T09:26:50.733298Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "806dcda419b98288b170fcaee122e709197f8ae3c727329f1ea3ec2aed31419acd1028da485a462e39850aec933df018da4fb2d75f02f4a003f7749084d6b4a37818caffc674c41f947592f648155a93", + "created_at": "2025-01-27T07:18:18.62698Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca028a4646d58ef07166eaed2c5f068430fb9d7aa6b2bb94d53f8ce6261df2f932611aea12cad01a7b2cbc5169a4a0242c8d95c78ed5cde48bc139414ec63bbf696a56fb7c9b07218fa17bf8ba0aec", + "created_at": "2025-01-26T19:17:41.00587Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80647c152794bfb16ff75836d87e93363fe6827fd4a5673f84c839c65048fa9f8b4691a75f12ee974538b29858d8b6d1b935276ed594d657c754a84fb6229dd3b5881199598128dc1fae6a1e969d765b", + "created_at": "2025-01-26T18:56:24.995825Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "803fac504e3f9eca842b146b0d5dc358a258a83a1da25c53404f928eed4b607581a274499978e886f4923c1002d6ef33bd4b1374b0ede16c962dec4a562d53467ccf3c835c784544d07a181c56c886a5", + "created_at": "2025-01-24T15:23:31.160845Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8031fa3a733e7c218e91ad97413ed5640dbf934909f76ae7452fbd63c11eaa30825208b63462c29fe073410262afd99f39fa5f2d65d5bb834e6cff93e77e7fbeb7e63bdd3f2f6a91fa05dffe78335548", + "created_at": "2025-01-24T05:36:02.440032Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "d88cf79198e6489f4965d4855de57d12e33ba3d0d91c9490807c6f092f176c90", + "created_at": "2025-01-23T05:30:44.092337Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a866c1775d76e7884f3e27eae779ffe9a0fe2bdf8f8c5d9ae20ab1d3de4211d3dbfc689613a18ad21957a625ee60a00a2b811666d6a8b96ce62e17353626bb643bb9fa4062b6e6d6b8d9aea0371c79", + "created_at": "2025-01-22T04:43:11.923746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "805adb0dfe07ccf6c50df056ee5b0cca2ef67f1cee8045db9e2dec6dd48d6c9633b86635efd73673c72a3bc8ab84e3af4f85b7d1a8e377563272e7999eb16fcbfbced5fe9e26dc9e08db8973e0891418", + "created_at": "2025-01-21T03:06:34.117688Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "3eef457f5a0c9dd01c600ee142c1cd812034f603690c0d3e8c6c6c6c073ab075", + "created_at": "2025-01-15T13:18:37.405547Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9adb5efb25e5dd635103e3fa8475ccfb4806f262235015dcde5985fcddfc00db", + "created_at": "2025-01-15T07:59:32.530759Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "9f4c91f42937f2f6991d772680e6d2f6f840e7eee3d4992328c3912e45365190", + "created_at": "2025-01-14T20:36:03.102001Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809065933d06e42d27179dfe7f24ef7c34e74c0898c184cc1de0abd791f0f9d2a1342ad140129c3a26ba7a4f86b3534358475d9964024ff373bc2c705bc2d999cbbe0402af60077fb7af6c1f73295bd7", + "created_at": "2025-01-14T17:54:05.295746Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "2c0a2b1f6891af16b45df24c7b05b1598d414f64fae7c5ef3eb41d92b45bc275", + "created_at": "2025-01-13T06:09:35.973958Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "f1f43292dc972188ccf2bb5a2523342482280cd37e6e80540c7f41890b8f5868", + "created_at": "2025-01-13T02:06:21.211287Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80560b4f465af52f745b646beaeba703a1877ef6988eb06f38b5f023e6affb4f6a8d8c22123c53767d2f17fae4bfa1df218117400a0d175ffd2066bae361bab07d589bbfd9ae5e693e8af34476625f58", + "created_at": "2025-01-12T12:18:40.312161Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "8009ae3cb1eb8350aa78dfe4539e5858be8c0de73b66cccdb2baff95b211f3c13c56c9e9e837c9a44af93b9b631d5db658bfed4d899ba8ee773898acf49956d5df2638f37191fa5262572b75108cc075", + "created_at": "2025-01-10T14:43:30.030261Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "809155ab6e601835c405261f32a7046cc265d8899ffe5d3d484df422424101cba27d22e11531645c4c7d660a9b2c69641c9884622d08ba27b51458a03b67995e21791ba038a40f670fdcaa3a8f73403b", + "created_at": "2025-01-10T12:25:15.095949Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80a416c7a38c0b0e5f4cdc67cc22db4429b1abf069719b5fd249e067bd40f39a93c9ae72186cd4dbe9ee3f7d4b75b0572f6fcb6fd61f1447924bb5049e49d64111494690ab89f39ae64f13828d692357", + "created_at": "2025-01-08T21:35:48.016721Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80677e1cd0e34efdaf88b76a3bb2ce7086c4c20853c3b1ca7c638a1da310ffd884491071d224cacd90e72a0116dcc1c3ebaab19a79e7eabb560f7ca21458945ff1a085e43a8b41d491f3eec625186aa1", + "created_at": "2025-01-08T16:07:56.454603Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80d2897aafd7c4a6e382d80212ba469b5348669930fd34db0f8aae76f7059db340f7118963ef89d109480f2cb83679e7dd71a5766b764a8a546ff958f66f5ddbf17140658079e329f170bf9e47f68ae5", + "created_at": "2025-01-08T15:16:15.675842Z", + "user_id": "luke_skywalker" + }, + { + "push_provider": "apn", + "push_provider_name": "APN-Configuration", + "id": "80ca9df3ad609fa3e61a033f403e3b6acb7039aaa58285061f5bd189d9a1659857216129e70e3fa267691c5b4ca20452aaaf683aa7d2f1aa98adaa8c162e8f8ef668da54070e79c3b8470add34e45b31", + "created_at": "2025-01-08T12:58:51.72573Z", + "user_id": "luke_skywalker" } + ], + "invisible": false, + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine" }, - "total_unread_count": 0, - "type": "message.new", - "unread_channels": 1, - "unread_count": 0, - "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "attachments": [ + + ], + "latest_reactions": [ + + ], + "own_reactions": [ + + ], + "reaction_counts": { + }, + "reaction_scores": { }, - "watcher_count": 1 + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:37.094228Z", + "updated_at": "2025-01-31T16:18:37.094228Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "user": { + "id": "luke_skywalker", + "name": "Luke Skywalker", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "language": "id", + "role": "admin", + "teams": [ + + ], + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "banned": false, + "online": true, + "last_active": "2025-01-31T16:15:56.152156879Z", + "blocked_user_ids": [ + + ], + "team": "test", + "type": "team", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "privacy_settings": { + "read_receipts": { + "enabled": false + }, + "typing_indicators": { + "enabled": false + } + } + }, + "watcher_count": 1, + "unread_count": 0, + "total_unread_count": 0, + "unread_channels": 1 } \ No newline at end of file diff --git a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_reaction.json b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_reaction.json index 98e479130a4..23e9d20d52b 100644 --- a/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_reaction.json +++ b/TestTools/StreamChatTestMockServer/Fixtures/JSONs/ws_reaction.json @@ -1,128 +1,134 @@ { - "channel_id": "a3df1140-d2d5-11ef-9a17-6698a84f0422", - "channel_last_message_at": "2025-01-15T00:14:13.273479Z", - "channel_type": "messaging", - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.530038563Z", - "message": { - "attachments": [], - "cid": "messaging:a3df1140-d2d5-11ef-9a17-6698a84f0422", - "created_at": "2025-01-15T00:14:13.273479Z", - "deleted_reply_count": 0, - "html": "Test
\n", - "id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "latest_reactions": [ - { - "created_at": "2025-01-15T00:14:13.509816Z", - "message_id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "score": 1, - "type": "like", - "updated_at": "2025-01-15T00:14:13.509816Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - }, - "user_id": "luke_skywalker" - } - ], - "mentioned_users": [], - "own_reactions": [], - "pin_expires": null, - "pinned": false, - "pinned_at": null, - "pinned_by": null, - "reaction_counts": { - "like": 1 - }, - "reaction_groups": { - "like": { - "count": 1, - "first_reaction_at": "2025-01-15T00:14:13.509816Z", - "last_reaction_at": "2025-01-15T00:14:13.509816Z", - "sum_scores": 1 - } - }, - "reaction_scores": { - "like": 1 - }, - "reply_count": 0, - "shadowed": false, - "silent": false, - "text": "Test", - "type": "regular", - "updated_at": "2025-01-15T00:14:13.519027Z", - "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "type": "reaction.new", + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_id": "09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "channel_type": "messaging", + "message": { + "id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "text": "Test", + "html": "Test
\n", + "type": "regular", + "user": { + "id": "luke_skywalker", + "role": "admin", + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "last_active": "2025-01-31T16:15:56.152156879Z", + "last_engaged_at": "2025-01-31T00:11:13.65581Z", + "banned": false, + "online": true, + "language": "id", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "name": "Luke Skywalker", + "team": "test", + "type": "team", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg" }, - "reaction": { - "created_at": "2025-01-15T00:14:13.509816Z", - "message_id": "a550aea8-d2d5-11ef-9a17-6698a84f0422", - "score": 1, - "type": "like", - "updated_at": "2025-01-15T00:14:13.509816Z", + "attachments": [ + + ], + "latest_reactions": [ + { + "message_id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "user_id": "luke_skywalker", "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" + "id": "luke_skywalker", + "role": "admin", + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "last_active": "2025-01-31T16:15:56.152156879Z", + "last_engaged_at": "2025-01-31T00:11:13.65581Z", + "banned": false, + "online": true, + "language": "id", + "birthland": "Tatooine", + "name": "Luke Skywalker", + "team": "test", + "type": "team", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "pando": "{\"speciality\":\"ios engineer\"}" }, - "user_id": "luke_skywalker" + "type": "like", + "score": 1, + "created_at": "2025-01-31T16:18:37.304432Z", + "updated_at": "2025-01-31T16:18:37.304432Z" + } + ], + "own_reactions": [ + + ], + "reaction_counts": { + "like": 1 }, - "type": "reaction.new", + "reaction_scores": { + "like": 1 + }, + "reaction_groups": { + "like": { + "count": 1, + "sum_scores": 1, + "first_reaction_at": "2025-01-31T16:18:37.304432Z", + "last_reaction_at": "2025-01-31T16:18:37.304432Z" + } + }, + "reply_count": 0, + "deleted_reply_count": 0, + "cid": "messaging:09f99d09-a2a7-4fb0-ae8d-25927c147b67", + "created_at": "2025-01-31T16:18:37.094228Z", + "updated_at": "2025-01-31T16:18:37.310539Z", + "shadowed": false, + "mentioned_users": [ + + ], + "silent": false, + "pinned": false, + "pinned_at": null, + "pinned_by": null, + "pin_expires": null + }, + "reaction": { + "message_id": "b222d2eb-d0e3-4d82-a029-68a9e5a3d261", + "user_id": "luke_skywalker", "user": { - "banned": false, - "birthland": "Tatooine", - "created_at": "2024-04-04T09:26:11.805899Z", - "id": "luke_skywalker", - "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", - "language": "en", - "last_active": "2025-01-15T00:14:08.859656064Z", - "last_engaged_at": "2025-01-14T00:34:40.19077Z", - "name": "Luke Skywalker", - "online": true, - "pando": "{\"speciality\":\"ios engineer\"}", - "role": "admin", - "team": "test", - "type": "team", - "updated_at": "2025-01-05T17:08:30.981929Z" - } + "id": "luke_skywalker", + "role": "admin", + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "last_active": "2025-01-31T16:15:56.152156879Z", + "last_engaged_at": "2025-01-31T00:11:13.65581Z", + "banned": false, + "online": true, + "language": "id", + "team": "test", + "type": "team", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "name": "Luke Skywalker" + }, + "type": "like", + "score": 1, + "created_at": "2025-01-31T16:18:37.304432Z", + "updated_at": "2025-01-31T16:18:37.304432Z" + }, + "user": { + "id": "luke_skywalker", + "role": "admin", + "created_at": "2024-04-04T09:26:11.805899Z", + "updated_at": "2025-01-31T09:38:22.825054Z", + "last_active": "2025-01-31T16:15:56.152156879Z", + "last_engaged_at": "2025-01-31T00:11:13.65581Z", + "banned": false, + "online": true, + "language": "id", + "image": "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg", + "pando": "{\"speciality\":\"ios engineer\"}", + "birthland": "Tatooine", + "name": "Luke Skywalker", + "team": "test", + "type": "team" + }, + "channel_last_message_at": "2025-01-31T16:18:37.094228Z", + "created_at": "2025-01-31T16:18:37.319338494Z" } \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b201a1c25be..d31ce23273c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -758,7 +758,7 @@ private_lane :update_testplan_on_ci do |options| end lane :sync_mock_server do - sh('python3 sync_mock_server.py') + sh('bundle exec ruby sync_mock_server.rb') next unless is_ci pr_create( diff --git a/fastlane/sync_mock_server.py b/fastlane/sync_mock_server.py deleted file mode 100644 index a6dd8b34417..00000000000 --- a/fastlane/sync_mock_server.py +++ /dev/null @@ -1,214 +0,0 @@ -import aiohttp -import asyncio -import json -import uuid -import os - -stream_base_url = 'chat.stream-io-api.com' -stream_http_url = 'https://' + stream_base_url -stream_wss_url = 'wss://' + stream_base_url + '/connect' -stream_demo_api_key = '8br4watad788' -stream_demo_token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoibHVrZV9za3l3YWxrZXIifQ.kFSLHRB5X62t0Zlc7nwczWUfsQMwfkpylC6jCUZ6Mc0' -stream_user_id = 'luke_skywalker' -stream_headers = { 'Authorization' : stream_demo_token, 'Stream-Auth-Type' : 'jwt' } -stream_messages_url_path = stream_http_url + '/messages' -stream_channels_url_path = stream_http_url + '/channels' -stream_messaging_url_path = stream_channels_url_path + '/messaging' -mock_server_fixtures_path = '../TestTools/StreamChatTestMockServer/Fixtures/JSONs' -test_tools_fixtures_path = '../TestTools/StreamChatTestTools/Fixtures/Images' - -def connect_endpoint(): - print('Connecting to websocket...') - payload = json.dumps({ - 'user_id': stream_user_id, - 'user_details': { - 'id': stream_user_id, - 'name': 'Luke%20Skywalker', - 'image':'https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg', - 'birthland':'Tatooine' - }, - 'server_determines_connection_id': True - }).replace(' ', '') - query_params = ['api_key=' + stream_demo_api_key, 'json=' + payload] - return stream_wss_url + '?' + '&'.join(query_params) - -async def request_channels(session, connection_id): - print('Requesting channel list...') - payload = json.dumps({ - 'filter_conditions': { - 'members': { - '$in': [stream_user_id] - } - }, - 'limit': 20, - 'member_limit': 30, - 'message_limit': 25, - 'watch': True - }).replace(' ', '') - query_params = ['api_key=' + stream_demo_api_key, 'connection_id=' + connection_id, 'payload=' + payload] - endpoint = stream_channels_url_path + '?' + '&'.join(query_params) - async with session.get(endpoint, headers=stream_headers) as response: - channels = await response.json() - first_channel = channels['channels'][0] - channels['channels'] = [first_channel] - save_json(channels, filename='http_channels.json') - -async def send_typing_event(session, ws, channel_id): - print('Sending typing event...') - payload = json.dumps({ - 'event': { - 'type': 'typing.start' - } - }) - endpoint = stream_messaging_url_path + '/' + channel_id + '/event?api_key=' + stream_demo_api_key - async with session.post(endpoint, data=payload, headers=stream_headers) as response: - save_json(await response.json(), filename='http_events.json') - - ws_typing_event_received = False - while not ws_typing_event_received: # multiple 'user.watching.start' events are received before the 'typing.start' event - ws_response = (await ws.receive()).json() - ws_typing_event_received = ws_response['type'] == 'typing.start' - - save_json(ws_response, filename='ws_events.json') - -def random_uuid(): - return str(uuid.uuid1()) - -async def send_regular_message(session, ws, channel_id): - message_id = await send_message(session=session, text='Test', channel_id=channel_id, filename='http_message.json') - save_json((await ws.receive()).json(), filename='ws_message.json') - return message_id - -async def send_ephemeral_message(session, channel_id): - await send_message(session=session, text='/giphy Test', channel_id=channel_id, filename='http_message_ephemeral.json') - -async def send_youtube_link(session, channel_id): - await send_message(session=session, text='https://youtube.com/watch?v=xOX7MsrbaPY', channel_id=channel_id, filename='http_youtube_link.json') - -async def send_unsplash_link(session, channel_id): - await send_message(session=session, text='https://unsplash.com/photos/1_2d3MRbI9c', channel_id=channel_id, filename='http_unsplash_link.json') - -async def send_message(session, text, channel_id, filename): - print('Sending message: "' + text + '"...') - message_id = random_uuid() - payload = json.dumps({ - 'message': { - 'id': message_id, - 'show_in_channel': False, - 'pinned': False, - 'silent': False, - 'text': text - } - }) - endpoint = stream_messaging_url_path + '/' + channel_id + '/message?api_key=' + stream_demo_api_key - async with session.post(endpoint, data=payload, headers=stream_headers) as response: - save_json(await response.json(), filename=filename) - return message_id - -def save_json(json_data, filename): - with open(os.path.abspath(mock_server_fixtures_path) + '/' + filename, 'w', encoding='utf-8') as f: - json.dump(json_data, f, sort_keys=True, ensure_ascii=False, indent=4) - print('✅ ' + filename) - -async def create_channel(session, connection_id): - print('Creating channel...') - payload = json.dumps({ - 'data': { - 'members': [stream_user_id, 'han_solo', 'count_dooku'], - 'name': 'Sync Mock Server', - }, - 'presence': True, - 'state': True, - 'watch': True, - 'messages': { - 'limit': 25 - } - }) - channel_id = random_uuid() - query_params = ['api_key=' + stream_demo_api_key, 'connection_id=' + connection_id] - endpoint = stream_messaging_url_path + '/' + channel_id + '/query?' + '&'.join(query_params) - async with session.post(endpoint, data=payload, headers=stream_headers) as response: - save_json(await response.json(), filename='http_channel_creation.json') - return channel_id - -async def remove_channel(session, channel_id): - print('Deleting channel...') - endpoint = stream_messaging_url_path + '/' + channel_id + '?api_key=' + stream_demo_api_key - async with session.delete(endpoint, headers=stream_headers) as response: - save_json(await response.json(), filename='http_channel_removal.json') - -async def add_reaction(session, ws, message_id): - print('Adding reaction...') - payload = json.dumps({ - 'enforce_unique': False, - 'reaction': { - 'type': 'like', - 'score': 1 - } - }) - endpoint = stream_messages_url_path + '/' + message_id + '/reaction?api_key=' + stream_demo_api_key - async with session.post(endpoint, data=payload, headers=stream_headers) as response: - save_json(await response.json(), filename='http_reaction.json') - save_json((await ws.receive()).json(), filename='ws_reaction.json') - -async def send_attachment(session, channel_id): - print('Sending image attachment...') - image = open(os.path.abspath(test_tools_fixtures_path) + '/yoda.jpg', 'rb') - endpoint = stream_messaging_url_path + '/' + channel_id + '/image?api_key=' + stream_demo_api_key - async with session.post(endpoint, data={'file':image}, headers=stream_headers) as response: - save_json(await response.json(), filename='http_attachment.json') - -async def truncate_channel_with_messsage(session, channel_id): - print('Truncating channel with message...') - payload = json.dumps({ - 'hard_delete': True, - 'skip_push': False, - 'message': { - 'id': random_uuid(), - 'show_in_channel': False, - 'pinned': False, - 'silent': False, - 'text': 'Channel truncated' - } - }) - endpoint = stream_messaging_url_path + '/' + channel_id + '/truncate?api_key=' + stream_demo_api_key - async with session.post(endpoint, data=payload, headers=stream_headers) as response: - save_json(await response.json(), filename='http_truncate.json') - -async def add_member_to_channel(session, ws, channel_id): - print('Adding member to channel...') - payload = json.dumps({ - 'add_members': ['leia_organa'], - 'hide_history': False - }) - endpoint = stream_messaging_url_path + '/' + channel_id + '?api_key=' + stream_demo_api_key - async with session.post(endpoint, data=payload, headers=stream_headers) as response: - save_json(await response.json(), filename='http_add_member.json') - save_json((await ws.receive()).json(), filename='ws_events_member.json') - save_json((await ws.receive()).json(), filename='ws_events_channel.json') - -async def establish_websocket_connection(ws): - health_check = (await ws.receive()).json() - for key in ['channel_mutes', 'mutes', 'devices']: - health_check['me'][key] = [] - save_json(health_check, filename='ws_health_check.json') - return health_check['connection_id'] - -async def chat(): - async with aiohttp.ClientSession() as session: - async with session.ws_connect(url=connect_endpoint(), headers=stream_headers) as ws: - connection_id = await establish_websocket_connection(ws) - channel_id = await create_channel(session, connection_id) - await request_channels(session, connection_id) - await send_typing_event(session, ws, channel_id) - message_id = await send_regular_message(session, ws, channel_id) - await add_reaction(session, ws, message_id) - await add_member_to_channel(session, ws, channel_id) - await send_attachment(session, channel_id) - await send_ephemeral_message(session, channel_id) - await send_youtube_link(session, channel_id) - await send_unsplash_link(session, channel_id) - await truncate_channel_with_messsage(session, channel_id) - await remove_channel(session, channel_id) - -asyncio.run(chat()) diff --git a/fastlane/sync_mock_server.rb b/fastlane/sync_mock_server.rb new file mode 100644 index 00000000000..55a8cec6029 --- /dev/null +++ b/fastlane/sync_mock_server.rb @@ -0,0 +1,279 @@ +require 'net/http' +require 'json' +require 'securerandom' +require 'faye/websocket' +require 'eventmachine' +require 'uri' + +STREAM_BASE_URL = 'chat.stream-io-api.com' +STREAM_HTTP_URL = "https://#{STREAM_BASE_URL}" +STREAM_WSS_URL = "wss://#{STREAM_BASE_URL}/connect" +STREAM_DEMO_API_KEY = '8br4watad788' +STREAM_DEMO_TOKEN = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoibHVrZV9za3l3YWxrZXIifQ.kFSLHRB5X62t0Zlc7nwczWUfsQMwfkpylC6jCUZ6Mc0' +STREAM_USER_ID = 'luke_skywalker' +STREAM_HEADERS = { + 'Authorization' => STREAM_DEMO_TOKEN, + 'Stream-Auth-Type' => 'jwt', + 'Content-Type' => 'application/json' +} +MOCK_SERVER_FIXTURES_PATH = '../TestTools/StreamChatTestMockServer/Fixtures/JSONs' +TEST_TOOLS_FIXTURES_PATH = '../TestTools/StreamChatTestTools/Fixtures/Images' + +def connect_endpoint + payload = { + user_id: STREAM_USER_ID, + user_details: { + id: STREAM_USER_ID, + name: 'Luke Skywalker', + image: 'https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg', + birthland: 'Tatooine' + }, + server_determines_connection_id: true + }.to_json + query_params = ["api_key=#{STREAM_DEMO_API_KEY}", "json=#{URI.encode_www_form_component(payload)}"] + "#{STREAM_WSS_URL}?#{query_params.join('&')}" +end + +def establish_websocket_connection(event_data) + health_check = JSON.parse(event_data) + health_check['me']['channel_mutes'] = [] + health_check['me']['mutes'] = [] + health_check['me']['devices'] = [] + save_json(health_check, 'ws_health_check.json') + health_check['connection_id'] +end + +def request_channels(connection_id) + payload = { + filter_conditions: { + members: { '$in': [STREAM_USER_ID] } + }, + limit: 20, + member_limit: 30, + message_limit: 25, + watch: true + }.to_json + query_params = [ + "api_key=#{STREAM_DEMO_API_KEY}", + "connection_id=#{connection_id}", + "payload=#{URI.encode_www_form_component(payload)}" + ] + endpoint = "#{STREAM_HTTP_URL}/channels?#{query_params.join('&')}" + response = http_get(endpoint) + response['channels'] = [response['channels'][0]] + response['channels'][0]['members'].each_with_index do |member, i| + response['channels'][0]['read'][i] = {} + response['channels'][0]['read'][i]['user'] = member['user'] + response['channels'][0]['read'][i]['unread_messages'] = 0 + response['channels'][0]['read'][i]['last_read'] = Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ') + end + + save_json(response, 'http_channels.json') +end + +def send_typing_event(channel_id) + payload = { event: { type: 'typing.start' } }.to_json + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}/event?api_key=#{STREAM_DEMO_API_KEY}" + response = http_post(endpoint, payload) + save_json(response, 'http_events.json') +end + +def send_message(channel_id, text, filename) + message_id = SecureRandom.uuid + payload = { + message: { + id: message_id, + show_in_channel: false, + pinned: false, + silent: false, + text: text + } + }.to_json + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}/message?api_key=#{STREAM_DEMO_API_KEY}" + response = http_post(endpoint, payload) + save_json(response, filename) + message_id +end + +def send_youtube_link(channel_id) + send_message(channel_id, 'https://youtube.com/watch?v=xOX7MsrbaPY', 'http_youtube_link.json') +end + +def send_ephemeral_message(channel_id) + send_message(channel_id, '/giphy Test', 'http_message_ephemeral.json') +end + +def send_unsplash_link(channel_id) + send_message(channel_id, 'https://unsplash.com/photos/1_2d3MRbI9c', 'http_unsplash_link.json') +end + +def send_giphy_link(channel_id) + send_message(channel_id, 'https://giphy.com/gifs/test-gw3IWyGkC0rsazTi', 'http_giphy_link.json') +end + +def create_channel(connection_id) + payload = { + data: { + members: [STREAM_USER_ID, 'han_solo', 'count_dooku'], + name: 'Sync Mock Server' + }, + presence: true, + state: true, + watch: true, + messages: { limit: 25 } + }.to_json + channel_id = SecureRandom.uuid + query_params = ["api_key=#{STREAM_DEMO_API_KEY}", "connection_id=#{connection_id}"] + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}/query?#{query_params.join('&')}" + response = http_post(endpoint, payload) + save_json(response, 'http_channel_creation.json') + channel_id +end + +def add_reaction(message_id) + payload = { + enforce_unique: false, + reaction: { + type: 'like', + score: 1 + } + }.to_json + endpoint = "#{STREAM_HTTP_URL}/messages/#{message_id}/reaction?api_key=#{STREAM_DEMO_API_KEY}" + response = http_post(endpoint, payload) + save_json(response, 'http_reaction.json') +end + +def truncate_channel_with_message(channel_id) + payload = { + hard_delete: true, + skip_push: false, + message: { + id: SecureRandom.uuid, + show_in_channel: false, + pinned: false, + silent: false, + text: 'Channel truncated' + } + }.to_json + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}/truncate?api_key=#{STREAM_DEMO_API_KEY}" + response = http_post(endpoint, payload) + save_json(response, 'http_truncate.json') +end + +def add_member_to_channel(channel_id) + payload = { + add_members: ['leia_organa'], + hide_history: false + }.to_json + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}?api_key=#{STREAM_DEMO_API_KEY}" + response = http_post(endpoint, payload) + save_json(response, 'http_add_member.json') +end + +def remove_channel(channel_id) + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}?api_key=#{STREAM_DEMO_API_KEY}" + response = http_delete(endpoint) + save_json(response, 'http_channel_removal.json') +end + +def send_attachment(channel_id) + boundary = "----RubyMultipartPostBoundary" + image_path = File.expand_path("#{TEST_TOOLS_FIXTURES_PATH}/yoda.jpg") + image_basename = File.basename(image_path) + image = File.open(image_path, 'rb') + payload = [] + payload << "--#{boundary}\r\n" + payload << "Content-Disposition: form-data; name=\"file\"; filename=\"#{image_basename}\"\r\n" + payload << "Content-Type: image/jpeg\r\n\r\n" + payload << image + payload << "\r\n--#{boundary}--\r\n" + headers = STREAM_HEADERS.dup + headers['Content-Type'] = "multipart/form-data; boundary=#{boundary}" + endpoint = "#{STREAM_HTTP_URL}/channels/messaging/#{channel_id}/image?api_key=#{STREAM_DEMO_API_KEY}" + response = http_post(endpoint, payload.join, headers) + save_json(response, 'http_attachment.json') +end + +def save_json(data, filename) + File.write("#{MOCK_SERVER_FIXTURES_PATH}/#{filename}", JSON.pretty_generate(data)) + puts("✅ #{filename}") +end + +def http_get(url, headers = STREAM_HEADERS) + uri = URI(url) + request = Net::HTTP::Get.new(uri, headers) + response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| + http.request(request) + end + JSON.parse(response.body) +end + +def http_post(url, payload, headers = STREAM_HEADERS) + uri = URI(url) + request = Net::HTTP::Post.new(uri, headers) + request.body = payload + response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| + http.request(request) + end + JSON.parse(response.body) +end + +def http_delete(url, headers = STREAM_HEADERS) + uri = URI(url) + request = Net::HTTP::Delete.new(uri, headers) + response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| + http.request(request) + end + JSON.parse(response.body) +end + +EM.run do + ws = Faye::WebSocket::Client.new(connect_endpoint, nil, headers: STREAM_HEADERS) + + ws.on(:message) do |event| + case JSON.parse(event.data)['type'] + when 'health.check' + next if @connection_id + + @connection_id = establish_websocket_connection(event.data) + channel_id = create_channel(@connection_id) + request_channels(@connection_id) + send_typing_event(channel_id) + message_id = send_message(channel_id, 'Test', 'http_message.json') + add_reaction(message_id) + add_member_to_channel(channel_id) + send_attachment(channel_id) + send_ephemeral_message(channel_id) + send_youtube_link(channel_id) + send_unsplash_link(channel_id) + send_giphy_link(channel_id) + truncate_channel_with_message(channel_id) + remove_channel(channel_id) + when 'typing.start' + save_json(JSON.parse(event.data), 'ws_events.json') + when 'message.new' + next if @new_message + + @new_message = 1 + save_json(JSON.parse(event.data), 'ws_message.json') + when 'reaction.new' + save_json(JSON.parse(event.data), 'ws_reaction.json') + when 'member.added' + save_json(JSON.parse(event.data), 'ws_events_member.json') + when 'channel.updated' + json = JSON.parse(event.data) + json['channel']['members'].each do |member| + member['user']['privacy_settings']['typing_indicators']['enabled'] = true + member['user']['privacy_settings']['read_receipts']['enabled'] = true + end + save_json(json, 'ws_events_channel.json') + when 'channel.deleted' + ws.close + end + end + + ws.on(:close) do |event| + ws = nil + exit 0 + end +end diff --git a/requirements.txt b/requirements.txt index daedc9ace1e..adc06a4fa26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ lizard -aiohttp