From 9e5af14839c820479baa32ed61236c741fa76e7a Mon Sep 17 00:00:00 2001 From: Christoph Proeschel Date: Wed, 21 Jul 2021 11:56:45 +0200 Subject: [PATCH] [#2192] Hotfix: inbox message list crash (#2194) --- docs/docs/changelog.md | 308 +----------------- .../Inbox/Messenger/MessageList/index.tsx | 59 ++-- 2 files changed, 32 insertions(+), 335 deletions(-) diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 62f21c82be..8b066e48f7 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -3,10 +3,19 @@ title: Changelog sidebar_label: 📝 Changelog --- +## Hotfix 0.26.3 + +[[#2192](https://github.com/airyhq/airy/issues/2192)] Inbox crashing when selecting conversations in filtered view [[#2193](https://github.com/airyhq/airy/pull/2193)] + +## Hotfix 0.26.2 + +[[#2187](https://github.com/airyhq/airy/issues/2187)] Hotfix chat plugin async bundle loading failed on installed websites + ## Hotfix 0.26.1 [[#2181](https://github.com/airyhq/airy/issues/2181)] Fixes chat plugin integration crashing with empty config + ## 0.26.0 #### Changes @@ -1303,302 +1312,3 @@ You can download the Airy CLI for your operating system from the following links - [[#548](https://github.com/airyhq/airy/issues/548)] Extract payload to web library and introduce date lib [[#556](https://github.com/airyhq/airy/pull/556)] - [[#551](https://github.com/airyhq/airy/issues/551)] Use test.properties everywhere [[#553](https://github.com/airyhq/airy/pull/553)] -## 0.3.0 - -#### Changes - -- [[#472](https://github.com/airyhq/airy/issues/472)] Fix guide link [[#488](https://github.com/airyhq/airy/pull/488)] - -#### 🚀 Features - -- [[#473](https://github.com/airyhq/airy/issues/473)] Rely on allowed origins setup from the env [[#505](https://github.com/airyhq/airy/pull/505)] -- [[#257](https://github.com/airyhq/airy/issues/257)] Add tags to core [[#431](https://github.com/airyhq/airy/pull/431)] -- [[#310](https://github.com/airyhq/airy/issues/310)] Airy CLI [[#468](https://github.com/airyhq/airy/pull/468)] -- [[#393](https://github.com/airyhq/airy/issues/393)] AllowedOrigin in airy.conf [[#469](https://github.com/airyhq/airy/pull/469)] -- [[#310](https://github.com/airyhq/airy/issues/310)] Add go api client lib [[#460](https://github.com/airyhq/airy/pull/460)] -- [[#452](https://github.com/airyhq/airy/issues/452)] Split auth dependency [[#456](https://github.com/airyhq/airy/pull/456)] -- [[#457](https://github.com/airyhq/airy/issues/457)] Improve conversations query (indexes, restoration, api) [[#459](https://github.com/airyhq/airy/pull/459)] -- [[#451](https://github.com/airyhq/airy/issues/451)] Bash test messages generator [[#454](https://github.com/airyhq/airy/pull/454)] -- [[#437](https://github.com/airyhq/airy/issues/437)] Replace alignment in favor of sender type [[#441](https://github.com/airyhq/airy/pull/441)] -- [[#434](https://github.com/airyhq/airy/issues/434)] Move libs to the root of the monorepo [[#438](https://github.com/airyhq/airy/pull/438)] -- [[#370](https://github.com/airyhq/airy/issues/370)] Add conversation metadata filter docs [[#439](https://github.com/airyhq/airy/pull/439)] -- [[#342](https://github.com/airyhq/airy/issues/342)] Add guide on how to connect Rasa and fix webhook API [[#423](https://github.com/airyhq/airy/pull/423)] -- [[#413](https://github.com/airyhq/airy/issues/413)] Add /metadata.remove endpoint [[#430](https://github.com/airyhq/airy/pull/430)] -- [[#425](https://github.com/airyhq/airy/issues/425)] Migrate Code formating to Bazel tools [[#426](https://github.com/airyhq/airy/pull/426)] -- [[#290](https://github.com/airyhq/airy/issues/290)] Channels page [[#420](https://github.com/airyhq/airy/pull/420)] -- [[#427](https://github.com/airyhq/airy/issues/427)] Return default contact information [[#429](https://github.com/airyhq/airy/pull/429)] -- [[#413](https://github.com/airyhq/airy/issues/413)] Add /metadata.set endpoint [[#414](https://github.com/airyhq/airy/pull/414)] -- [[#370](https://github.com/airyhq/airy/issues/370)] Filter conversations on metadata [[#407](https://github.com/airyhq/airy/pull/407)] - -#### 🐛 Bug Fixes - -- [[#498](https://github.com/airyhq/airy/issues/498)] Fix image tags on conf [[#511](https://github.com/airyhq/airy/pull/511)] -- Fix codeowners syntax [[#512](https://github.com/airyhq/airy/pull/512)] -- [[#506](https://github.com/airyhq/airy/issues/506)] Remove unused labels [[#510](https://github.com/airyhq/airy/pull/510)] -- Fix sources configmap [[#500](https://github.com/airyhq/airy/pull/500)] -- [[#386](https://github.com/airyhq/airy/issues/386)] Add quote function [[#476](https://github.com/airyhq/airy/pull/476)] -- Hotfix for CI [[#465](https://github.com/airyhq/airy/pull/465)] -- [442] Fix glossary TOC [[#443](https://github.com/airyhq/airy/pull/443)] - -#### 📚 Documentation - -- [[#490](https://github.com/airyhq/airy/issues/490)] Reorganize sidebar [[#492](https://github.com/airyhq/airy/pull/492)] -- [[#484](https://github.com/airyhq/airy/issues/484)] Remove reset password docs [[#487](https://github.com/airyhq/airy/pull/487)] -- Several initial updates [[#477](https://github.com/airyhq/airy/pull/477)] -- Several improvements [[#478](https://github.com/airyhq/airy/pull/478)] -- Small improvements [[#479](https://github.com/airyhq/airy/pull/479)] -- [[#470](https://github.com/airyhq/airy/issues/470)] Specify --no-ff option in merge commands [[#471](https://github.com/airyhq/airy/pull/471)] -- [[#341](https://github.com/airyhq/airy/issues/341)] Introduce "how to connect a facebook page"… [[#436](https://github.com/airyhq/airy/pull/436)] -- [[#453](https://github.com/airyhq/airy/issues/453)] Update release docs [[#458](https://github.com/airyhq/airy/pull/458)] -- [[#444](https://github.com/airyhq/airy/issues/444)] Use prettier for markdown files as well [[#448](https://github.com/airyhq/airy/pull/448)] -- [[#442](https://github.com/airyhq/airy/issues/442)] Fix glossary TOC [[#443](https://github.com/airyhq/airy/pull/443)] - -#### 🧰 Maintenance - -- [[#462](https://github.com/airyhq/airy/issues/462)] Assign the label chore to dependabot pull requests [[#504](https://github.com/airyhq/airy/pull/504)] -- Add codeowners configuration [[#502](https://github.com/airyhq/airy/pull/502)] -- Bump ini from 1.3.5 to 1.3.7 in /docs [[#475](https://github.com/airyhq/airy/pull/475)] -- Bump ini from 1.3.5 to 1.3.7 [[#474](https://github.com/airyhq/airy/pull/474)] -- Bump elliptic from 6.5.2 to 6.5.3 [[#461](https://github.com/airyhq/airy/pull/461)] -- [[#432](https://github.com/airyhq/airy/issues/432)] Use Bazel tools web rules [[#435](https://github.com/airyhq/airy/pull/435)] - -## 0.2.0 - -#### Changes - -- [[#338](https://github.com/airyhq/airy/issues/338)] Add docs for running in production [[#359](https://github.com/airyhq/airy/pull/359)] -- [[#394](https://github.com/airyhq/airy/issues/394)] Fix broken link in documentation [[#395](https://github.com/airyhq/airy/pull/395)] -- [[#376](https://github.com/airyhq/airy/issues/376)] Fix chatplugin message sending and style loading [[#379](https://github.com/airyhq/airy/pull/379)] -- [324] Reflect in the docs our understanding of the release process [[#375](https://github.com/airyhq/airy/pull/375)] -- [[#351](https://github.com/airyhq/airy/issues/351)] Add Twilio deployment descriptors [[#374](https://github.com/airyhq/airy/pull/374)] -- [[#350](https://github.com/airyhq/airy/issues/350)] Twilio content mapper [[#373](https://github.com/airyhq/airy/pull/373)] -- [[#352](https://github.com/airyhq/airy/issues/352)] Add Twilio channel connection [[#371](https://github.com/airyhq/airy/pull/371)] -- [[#369](https://github.com/airyhq/airy/issues/369)] Show release process docs in the sidebar [[#372](https://github.com/airyhq/airy/pull/372)] -- [[#367](https://github.com/airyhq/airy/issues/367)] cleanup linting [[#368](https://github.com/airyhq/airy/pull/368)] -- [[#354](https://github.com/airyhq/airy/issues/354)] Add Twilio Events router, fix ingestion time bug in google source [[#365](https://github.com/airyhq/airy/pull/365)] -- [[#355](https://github.com/airyhq/airy/issues/355)] Add Twilio sender [[#366](https://github.com/airyhq/airy/pull/366)] -- [[#353](https://github.com/airyhq/airy/issues/353)] Add Twilio webhook [[#362](https://github.com/airyhq/airy/pull/362)] -- [[#337](https://github.com/airyhq/airy/issues/337)] Prettier linting uses tests [[#357](https://github.com/airyhq/airy/pull/357)] -- [[#334](https://github.com/airyhq/airy/issues/334)] Reflect components move in the docs [[#361](https://github.com/airyhq/airy/pull/361)] -- Change hostname in smoketest for chatplugin routes [[#363](https://github.com/airyhq/airy/pull/363)] -- Add chatplugin api docs [[#348](https://github.com/airyhq/airy/pull/348)] -- [[#322](https://github.com/airyhq/airy/issues/322)] Conversations.tag endpoint returns 500 on empty payload [[#360](https://github.com/airyhq/airy/pull/360)] -- [[#328](https://github.com/airyhq/airy/issues/328)] Update Subscribed Fields for Facebook Webhooks [[#329](https://github.com/airyhq/airy/pull/329)] -- [[#279](https://github.com/airyhq/airy/issues/279)] Add update delivery state message accessor [[#339](https://github.com/airyhq/airy/pull/339)] -- [[#349](https://github.com/airyhq/airy/issues/349)] Add Twilio source documentation [[#356](https://github.com/airyhq/airy/pull/356)] -- [[#346](https://github.com/airyhq/airy/issues/346)] Fix ingress configuration [[#347](https://github.com/airyhq/airy/pull/347)] -- [[#326](https://github.com/airyhq/airy/issues/326)] Update release process docs [[#332](https://github.com/airyhq/airy/pull/332)] -- [[#303](https://github.com/airyhq/airy/issues/303)] deploy chat plugin widget [[#333](https://github.com/airyhq/airy/pull/333)] -- [[#236](https://github.com/airyhq/airy/issues/236)] - Removing the current kafka-client pod [[#289](https://github.com/airyhq/airy/pull/289)] -- [[#231](https://github.com/airyhq/airy/issues/231)] Smoke test improvements [[#330](https://github.com/airyhq/airy/pull/330)] -- Fix the ci bazel config [[#320](https://github.com/airyhq/airy/pull/320)] -- [[#318](https://github.com/airyhq/airy/issues/318)] Docs should use the right branch [[#319](https://github.com/airyhq/airy/pull/319)] -- [[#302](https://github.com/airyhq/airy/issues/302)] Add chat plugin UI widget [[#311](https://github.com/airyhq/airy/pull/311)] -- Release npm components library v0.4.5 [[#317](https://github.com/airyhq/airy/pull/317)] -- Fix aws cli env variables in ci [[#316](https://github.com/airyhq/airy/pull/316)] -- [215] Infra/publish images [[#294](https://github.com/airyhq/airy/pull/294)] -- [[#268](https://github.com/airyhq/airy/issues/268)] Google/Facebook source documentation [[#301](https://github.com/airyhq/airy/pull/301)] -- [[#287](https://github.com/airyhq/airy/issues/287)] Add Java linting [[#295](https://github.com/airyhq/airy/pull/295)] -- [[#292](https://github.com/airyhq/airy/issues/292)] Configure algolia for docs.airy.co [[#293](https://github.com/airyhq/airy/pull/293)] -- Log web requests [[#291](https://github.com/airyhq/airy/pull/291)] -- Structure + Login for demo [[#263](https://github.com/airyhq/airy/pull/263)] -- Add google deployment descriptors [[#286](https://github.com/airyhq/airy/pull/286)] -- Add google admin api channel connection [[#284](https://github.com/airyhq/airy/pull/284)] -- [[#270](https://github.com/airyhq/airy/issues/270)] Google content mapper [[#285](https://github.com/airyhq/airy/pull/285)] -- [[#221](https://github.com/airyhq/airy/issues/221)] Further improvements to the script [[#283](https://github.com/airyhq/airy/pull/283)] -- Add authentication to communication websocket [[#282](https://github.com/airyhq/airy/pull/282)] -- Fix chat plugin messaging behavior [[#277](https://github.com/airyhq/airy/pull/277)] -- [[#264](https://github.com/airyhq/airy/issues/264)] Google event router [[#278](https://github.com/airyhq/airy/pull/278)] -- Fix reverse conversation list order [[#280](https://github.com/airyhq/airy/pull/280)] -- Add Google message sender app [[#275](https://github.com/airyhq/airy/pull/275)] -- Infra/smoke test improvement [[#262](https://github.com/airyhq/airy/pull/262)] -- [[#265](https://github.com/airyhq/airy/issues/265)] Google webhook ingestion [[#272](https://github.com/airyhq/airy/pull/272)] -- Prepare the codebase for release processes [[#260](https://github.com/airyhq/airy/pull/260)] -- Use airy specific dns entries for the dev box [[#261](https://github.com/airyhq/airy/pull/261)] -- Do not use javatuples [[#258](https://github.com/airyhq/airy/pull/258)] -- Expands contribution document [[#237](https://github.com/airyhq/airy/pull/237)] -- Generate typescript definitions from content model [[#241](https://github.com/airyhq/airy/pull/241)] -- Bug/245 send message duplicates webhook [[#249](https://github.com/airyhq/airy/pull/249)] -- [[#251](https://github.com/airyhq/airy/issues/251)] Do not remove the viewBox in SVGs [[#252](https://github.com/airyhq/airy/pull/252)] -- Fix request NPEs [[#248](https://github.com/airyhq/airy/pull/248)] -- [[#180](https://github.com/airyhq/airy/issues/180)] Extract testing helper to a java library [[#247](https://github.com/airyhq/airy/pull/247)] -- Fix name of provisioner [[#246](https://github.com/airyhq/airy/pull/246)] -- Temporary remove demo from the status output [[#242](https://github.com/airyhq/airy/pull/242)] -- Running core on alpine image with k3s [[#230](https://github.com/airyhq/airy/pull/230)] -- Map outbound content model in communication app [[#231](https://github.com/airyhq/airy/pull/231)] -- attempt to improve ci [[#234](https://github.com/airyhq/airy/pull/234)] -- Smoke test draft [[#232](https://github.com/airyhq/airy/pull/232)] -- Fixes #226 [[#233](https://github.com/airyhq/airy/pull/233)] -- Add alpine nginx image for demo app [[#229](https://github.com/airyhq/airy/pull/229)] -- Use the local components library version in the showcase app [[#228](https://github.com/airyhq/airy/pull/228)] -- Introduce sources top level menu [[#214](https://github.com/airyhq/airy/pull/214)] -- Update README.md [[#224](https://github.com/airyhq/airy/pull/224)] -- Do not autowire in production code [[#225](https://github.com/airyhq/airy/pull/225)] -- Refer to the main branch for the edit button in docs [[#220](https://github.com/airyhq/airy/pull/220)] -- Fix Facebook channel connection docs [[#222](https://github.com/airyhq/airy/pull/222)] -- Add deployment files for webhooks [[#206](https://github.com/airyhq/airy/pull/206)] -- Checks bootstrap script run path [[#192](https://github.com/airyhq/airy/pull/192)] -- Add demo app and globalize typescript type definitions [[#211](https://github.com/airyhq/airy/pull/211)] -- Add docusaurus and move docs [[#212](https://github.com/airyhq/airy/pull/212)] -- Small fixes before release [[#208](https://github.com/airyhq/airy/pull/208)] -- Fix consumer healthcheck endpoint in deployments [[#209](https://github.com/airyhq/airy/pull/209)] -- Minimal release script [[#203](https://github.com/airyhq/airy/pull/203)] -- fixed link to components website [[#205](https://github.com/airyhq/airy/pull/205)] -- Prepare the codebase for renaming [[#204](https://github.com/airyhq/airy/pull/204)] -- Orchestrate vagrant up and down [[#194](https://github.com/airyhq/airy/pull/194)] -- Fix sender app id [[#202](https://github.com/airyhq/airy/pull/202)] -- Filter out unknown webhooks [[#201](https://github.com/airyhq/airy/pull/201)] -- Require url and default to empty map for headers in webhook creation [[#198](https://github.com/airyhq/airy/pull/198)] -- Fix unauthorized response [[#200](https://github.com/airyhq/airy/pull/200)] -- Fix Searchfield [[#195](https://github.com/airyhq/airy/pull/195)] -- Disable test output in CI [[#193](https://github.com/airyhq/airy/pull/193)] -- Infra/schema reg protocol [[#199](https://github.com/airyhq/airy/pull/199)] -- Require color on tag creation [[#197](https://github.com/airyhq/airy/pull/197)] -- Introduce web test helper [[#191](https://github.com/airyhq/airy/pull/191)] -- One broker [[#190](https://github.com/airyhq/airy/pull/190)] -- Auth refactor [[#183](https://github.com/airyhq/airy/pull/183)] -- Change default bootstrap [[#184](https://github.com/airyhq/airy/pull/184)] -- Add line to apply the yaml [[#185](https://github.com/airyhq/airy/pull/185)] -- Fix bootstrap [[#181](https://github.com/airyhq/airy/pull/181)] -- Normalize health endpoints [[#179](https://github.com/airyhq/airy/pull/179)] -- Fix response code for duplicate email signups [[#178](https://github.com/airyhq/airy/pull/178)] -- Add auth middleware to admin [[#176](https://github.com/airyhq/airy/pull/176)] -- Add chat plugin [[#142](https://github.com/airyhq/airy/pull/142)] -- Add jwt to backend apps [[#175](https://github.com/airyhq/airy/pull/175)] -- Add bracket [[#174](https://github.com/airyhq/airy/pull/174)] -- Randomize jwt token and pg password [[#171](https://github.com/airyhq/airy/pull/171)] -- new version [[#172](https://github.com/airyhq/airy/pull/172)] -- Add subscribed\_fields to page connect API [[#173](https://github.com/airyhq/airy/pull/173)] -- Add channels connect endpoint [[#166](https://github.com/airyhq/airy/pull/166)] -- Change default port and mail [[#164](https://github.com/airyhq/airy/pull/164)] -- Allows /actuator/health routes to be accessible [[#165](https://github.com/airyhq/airy/pull/165)] -- Add mail vars to user inoput [[#163](https://github.com/airyhq/airy/pull/163)] -- Adds webhook api docs [[#161](https://github.com/airyhq/airy/pull/161)] -- Install virtualbox [[#158](https://github.com/airyhq/airy/pull/158)] -- Feature/remove translations [[#157](https://github.com/airyhq/airy/pull/157)] -- Check if there is a config file or not [[#159](https://github.com/airyhq/airy/pull/159)] -- Pull images while building the packer image [[#156](https://github.com/airyhq/airy/pull/156)] -- Rename endpoints so that naming is more consistent [[#153](https://github.com/airyhq/airy/pull/153)] -- Kafka topics config [[#155](https://github.com/airyhq/airy/pull/155)] -- Add local copies of the changed yamls [[#154](https://github.com/airyhq/airy/pull/154)] -- Add spring auth and spring security lib [[#127](https://github.com/airyhq/airy/pull/127)] -- Fix issue #134 [[#152](https://github.com/airyhq/airy/pull/152)] -- Clean up some scripts [[#151](https://github.com/airyhq/airy/pull/151)] -- Add box\_url instead of box [[#149](https://github.com/airyhq/airy/pull/149)] -- Disable audio for virtualbox [[#148](https://github.com/airyhq/airy/pull/148)] -- Fix curl example [[#147](https://github.com/airyhq/airy/pull/147)] -- Only print vagrant installation information if needed [[#146](https://github.com/airyhq/airy/pull/146)] -- Fix airy-core s3 image [[#143](https://github.com/airyhq/airy/pull/143)] -- Local Helm charts [[#139](https://github.com/airyhq/airy/pull/139)] -- Remove topbar and dependency on react-redux [[#144](https://github.com/airyhq/airy/pull/144)] -- Fix health check [[#137](https://github.com/airyhq/airy/pull/137)] -- Add chat plugin channel source [[#140](https://github.com/airyhq/airy/pull/140)] -- Introduce a user guide [[#138](https://github.com/airyhq/airy/pull/138)] -- Add chat plugin docs [[#136](https://github.com/airyhq/airy/pull/136)] -- Update user-input script for airy-core [[#130](https://github.com/airyhq/airy/pull/130)] -- Updates to the frontend readme [[#128](https://github.com/airyhq/airy/pull/128)] -- Remove date range, make showcase use npm library [[#125](https://github.com/airyhq/airy/pull/125)] -- Add ngrok sidecar to facebook webhook [[#126](https://github.com/airyhq/airy/pull/126)] -- Fix the left join topology call by reference issue [[#129](https://github.com/airyhq/airy/pull/129)] -- Add user input from config file [[#123](https://github.com/airyhq/airy/pull/123)] -- add readme [[#124](https://github.com/airyhq/airy/pull/124)] -- Move packer images to a separate folder [[#121](https://github.com/airyhq/airy/pull/121)] -- Fix library export [[#120](https://github.com/airyhq/airy/pull/120)] -- Add more components to showcase [[#118](https://github.com/airyhq/airy/pull/118)] -- Add conversation tag/untag [[#107](https://github.com/airyhq/airy/pull/107)] -- Bootstrap finishing [[#119](https://github.com/airyhq/airy/pull/119)] -- Bootstrap finishing [[#117](https://github.com/airyhq/airy/pull/117)] -- Implements /tags.update endpoint [[#114](https://github.com/airyhq/airy/pull/114)] -- Update topics configs [[#116](https://github.com/airyhq/airy/pull/116)] -- Download Vagrant at bootstrap time [[#112](https://github.com/airyhq/airy/pull/112)] -- Some gardening [[#115](https://github.com/airyhq/airy/pull/115)] -- Topics finder [[#113](https://github.com/airyhq/airy/pull/113)] -- User input [[#110](https://github.com/airyhq/airy/pull/110)] -- General cleanup of the docs [[#111](https://github.com/airyhq/airy/pull/111)] -- Delete tags endpoint [[#109](https://github.com/airyhq/airy/pull/109)] -- Infra/istio [[#99](https://github.com/airyhq/airy/pull/99)] -- Fix npm publishing [[#108](https://github.com/airyhq/airy/pull/108)] -- Creates /tags.list endpoint [[#105](https://github.com/airyhq/airy/pull/105)] -- Fix target name [[#106](https://github.com/airyhq/airy/pull/106)] -- Publish library on NPM [[#75](https://github.com/airyhq/airy/pull/75)] -- Rm App health checks from streaming apps [[#103](https://github.com/airyhq/airy/pull/103)] -- Creates the /tags.create endpoint [[#102](https://github.com/airyhq/airy/pull/102)] -- Add content mapper library, use content mapper on webhook publisher [[#96](https://github.com/airyhq/airy/pull/96)] -- Adds tags api documentation [[#98](https://github.com/airyhq/airy/pull/98)] -- Add wait-loop instead of sleep [[#97](https://github.com/airyhq/airy/pull/97)] -- Introduce a glossary [[#83](https://github.com/airyhq/airy/pull/83)] -- Images [[#86](https://github.com/airyhq/airy/pull/86)] -- New /users.password-reset endpoint [[#89](https://github.com/airyhq/airy/pull/89)] -- Add webhook consumer [[#88](https://github.com/airyhq/airy/pull/88)] -- Add webhook publisher [[#87](https://github.com/airyhq/airy/pull/87)] -- Enabe authorization [[#85](https://github.com/airyhq/airy/pull/85)] -- Add webhook api [[#84](https://github.com/airyhq/airy/pull/84)] -- Core auth email configuration [[#82](https://github.com/airyhq/airy/pull/82)] -- Fix components deploy [[#81](https://github.com/airyhq/airy/pull/81)] -- Adding Readme to infrastructure [[#80](https://github.com/airyhq/airy/pull/80)] -- Add password reset route [[#79](https://github.com/airyhq/airy/pull/79)] -- Prepare readme for launch [[#77](https://github.com/airyhq/airy/pull/77)] -- Add showcase app deployment [[#73](https://github.com/airyhq/airy/pull/73)] -- Core auth /users.accept-invitation endpoint [[#71](https://github.com/airyhq/airy/pull/71)] -- Some little gardening while reading the code [[#74](https://github.com/airyhq/airy/pull/74)] -- Create Components Library [[#57](https://github.com/airyhq/airy/pull/57)] -- Add login endpoint [[#70](https://github.com/airyhq/airy/pull/70)] -- Core auth create invitations endpoint [[#59](https://github.com/airyhq/airy/pull/59)] -- Add bootstrapping script [[#61](https://github.com/airyhq/airy/pull/61)] -- Add apache license [[#63](https://github.com/airyhq/airy/pull/63)] -- Add signup route with password hashing and jwt creation [[#62](https://github.com/airyhq/airy/pull/62)] -- Websocket docs [[#60](https://github.com/airyhq/airy/pull/60)] -- More design principles content [[#58](https://github.com/airyhq/airy/pull/58)] -- Add core auth app [[#56](https://github.com/airyhq/airy/pull/56)] -- Quick formatting updates to the docs [[#55](https://github.com/airyhq/airy/pull/55)] -- feature/core auth docs [[#53](https://github.com/airyhq/airy/pull/53)] -- Websocket add remaining implementations [[#52](https://github.com/airyhq/airy/pull/52)] -- Feature/streams to websocket [[#41](https://github.com/airyhq/airy/pull/41)] -- Unread count [[#42](https://github.com/airyhq/airy/pull/42)] -- Quick cleanup before next steps [[#40](https://github.com/airyhq/airy/pull/40)] -- Use group by key [[#38](https://github.com/airyhq/airy/pull/38)] -- Add facebook message sender [[#37](https://github.com/airyhq/airy/pull/37)] -- Feature/send message [[#32](https://github.com/airyhq/airy/pull/32)] -- Add delivery states to message [[#35](https://github.com/airyhq/airy/pull/35)] -- Send message requests in the events router [[#33](https://github.com/airyhq/airy/pull/33)] -- Fix the channels test [[#31](https://github.com/airyhq/airy/pull/31)] -- Channels API [[#28](https://github.com/airyhq/airy/pull/28)] -- Reorganize the docs so they can scale better [[#27](https://github.com/airyhq/airy/pull/27)] -- Remove deprecation [[#26](https://github.com/airyhq/airy/pull/26)] -- Upgrade to bazel 3.5.0 [[#25](https://github.com/airyhq/airy/pull/25)] -- More cleanup for test infrastructure [[#24](https://github.com/airyhq/airy/pull/24)] -- Speed up the tests [[#23](https://github.com/airyhq/airy/pull/23)] -- Kafka upgrade [[#22](https://github.com/airyhq/airy/pull/22)] -- Communication API [[#18](https://github.com/airyhq/airy/pull/18)] -- Small cleanups [[#21](https://github.com/airyhq/airy/pull/21)] -- Cleaning up while reading code [[#19](https://github.com/airyhq/airy/pull/19)] -- Ingestion platform draft [[#16](https://github.com/airyhq/airy/pull/16)] -- More docs infrastructure [[#9](https://github.com/airyhq/airy/pull/9)] -- Spell check the README [[#8](https://github.com/airyhq/airy/pull/8)] -- Core README v0 [[#4](https://github.com/airyhq/airy/pull/4)] -- Remove airy docs website from this repository [[#7](https://github.com/airyhq/airy/pull/7)] -- Fix edit url and root title [[#6](https://github.com/airyhq/airy/pull/6)] -- Hugo docs site [[#5](https://github.com/airyhq/airy/pull/5)] -- Setup Bazel dependencies, code formatters and github workflows [[#3](https://github.com/airyhq/airy/pull/3)] -- Basic docs ported from platform [[#2](https://github.com/airyhq/airy/pull/2)] -- Basic structure [[#1](https://github.com/airyhq/airy/pull/1)] - -#### 🐛 Bug Fixes - -- [417] Fix chatplugin chart [[#418](https://github.com/airyhq/airy/pull/418)] -- [[#408](https://github.com/airyhq/airy/issues/408)] Prioritize first apps [[#410](https://github.com/airyhq/airy/pull/410)] -- Generate random strings with helm [[#404](https://github.com/airyhq/airy/pull/404)] -- [[#405](https://github.com/airyhq/airy/issues/405)] Populate delivery state correctly [[#406](https://github.com/airyhq/airy/pull/406)] -- [[#388](https://github.com/airyhq/airy/issues/388)] Chat plugin text render bug fixed [[#392](https://github.com/airyhq/airy/pull/392)] -- [[#386](https://github.com/airyhq/airy/issues/386)] Add missing cors configuration [[#390](https://github.com/airyhq/airy/pull/390)] -- [[#378](https://github.com/airyhq/airy/issues/378)] Fix the code also and not only the docs for channel connection token [[#389](https://github.com/airyhq/airy/pull/389)] -- [[#378](https://github.com/airyhq/airy/issues/378)] Do not require token as most sources do not require it [[#380](https://github.com/airyhq/airy/pull/380)] -- [[#381](https://github.com/airyhq/airy/issues/381)] Classify pull requests as our conventions specify [[#382](https://github.com/airyhq/airy/pull/382)] - -#### 📚 Documentation - -- [415] Add gifs to connecting chatplugin channel documentation [[#419](https://github.com/airyhq/airy/pull/419)] -- Add Vbox known issue [[#409](https://github.com/airyhq/airy/pull/409)] -- [[#344](https://github.com/airyhq/airy/issues/344)] Enable copy\&paste of code snippets [[#391](https://github.com/airyhq/airy/pull/391)] -- Docs/chat plugin [[#383](https://github.com/airyhq/airy/pull/383)] - diff --git a/frontend/ui/src/pages/Inbox/Messenger/MessageList/index.tsx b/frontend/ui/src/pages/Inbox/Messenger/MessageList/index.tsx index dca2cf8c21..bcd3047e10 100644 --- a/frontend/ui/src/pages/Inbox/Messenger/MessageList/index.tsx +++ b/frontend/ui/src/pages/Inbox/Messenger/MessageList/index.tsx @@ -16,7 +16,7 @@ import {listMessages, listPreviousMessages} from '../../../../actions/messages'; import styles from './index.module.scss'; import {formatDateOfMessage} from '../../../../services/format/date'; -import {getCurrentMessages} from '../../../../selectors/conversations'; +import {getConversation, getCurrentMessages} from '../../../../selectors/conversations'; import {ConversationRouteProps} from '../../index'; import {MessageInfoWrapper} from 'render/components/MessageInfoWrapper'; import {formatTime, isSameDay} from 'dates'; @@ -25,16 +25,10 @@ type MessageListProps = ConnectedProps & { showSuggestedReplies: (suggestions: Suggestions) => void; }; -const mapStateToProps = (state: StateModel, ownProps: ConversationRouteProps) => { - return { - messages: getCurrentMessages(state, ownProps), - conversationId: ownProps.match.params.conversationId, - conversationChannelSource: state.data.conversations.all.items[ownProps.match.params.conversationId].channel.source, - conversationMetadataContact: - state.data.conversations.all.items[ownProps.match.params.conversationId].metadata.contact, - conversationPaginationData: state.data.conversations.all.items[ownProps.match.params.conversationId].paginationData, - }; -}; +const mapStateToProps = (state: StateModel, ownProps: ConversationRouteProps) => ({ + messages: getCurrentMessages(state, ownProps), + conversation: getConversation(state, ownProps), +}); const mapDispatchToProps = { listMessages, @@ -52,16 +46,18 @@ function usePrevious(value: Message[] | string) { } const MessageList = (props: MessageListProps) => { + const {listMessages, listPreviousMessages, showSuggestedReplies, messages, conversation} = props; + + if (!conversation) { + return null; + } + const { - listMessages, - listPreviousMessages, - showSuggestedReplies, - messages, - conversationChannelSource, - conversationId, - conversationMetadataContact, - conversationPaginationData, - } = props; + id: conversationId, + metadata: {contact}, + channel: {source}, + paginationData, + } = conversation; const prevMessages = usePrevious(messages); const prevCurrentConversationId = usePrevious(conversationId); @@ -71,11 +67,8 @@ const MessageList = (props: MessageListProps) => { useEffect(() => { if (!messages || messages.length === 0) { conversationId && listMessages(conversationId); - scrollBottom(); - } - if (messages?.length > 0) { - scrollBottom(); } + scrollBottom(); }, [conversationId, messages]); useEffect(() => { @@ -114,17 +107,11 @@ const MessageList = (props: MessageListProps) => { return !isSameDay(prevMessage.sentAt, message.sentAt); }; - const isLoadingConversation = () => { - return conversationPaginationData && conversationPaginationData.loading; - }; + const isLoadingConversation = () => paginationData && paginationData.loading; - const hasPreviousMessages = () => { - return !!(conversationPaginationData && conversationPaginationData.nextCursor); - }; + const hasPreviousMessages = () => !!(paginationData && paginationData.nextCursor); - const scrollbarVisible = () => { - return messageListRef.current.scrollHeight > messageListRef.current.clientHeight; - }; + const scrollbarVisible = () => messageListRef.current.scrollHeight > messageListRef.current.clientHeight; const scrollToMessage = id => { const element = document.querySelector(`#message-item-${id}`); @@ -190,12 +177,12 @@ const MessageList = (props: MessageListProps) => { )} - + ); @@ -207,7 +194,7 @@ const MessageList = (props: MessageListProps) => { const arePropsEqual = (prevProps, nextProps) => { if ( prevProps.history.location.pathname === nextProps.history.location.pathname && - prevProps.conversationId === nextProps.conversationId && + prevProps.conversation?.id === nextProps.conversation?.id && prevProps.history.location.key === nextProps.history.location.key && prevProps.location.key !== nextProps.location.key ) {