Skip to content

Commit

Permalink
Release/0.26.0 (#2153)
Browse files Browse the repository at this point in the history
* Bump version to 0.26.0-alpha

* Bump copy-webpack-plugin from 9.0.0 to 9.0.1 (#2059)

Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 9.0.0 to 9.0.1.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/copy-webpack-plugin@v9.0.0...v9.0.1)

---
updated-dependencies:
- dependency-name: copy-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [#1819] Add Airy favicon (#2067)

* [#2060] fixed edit of text templates (#2068)

* [#2056] Added first transition and animations (#2066)

* [#1391] Cypress test for suggested replies  (#2057)

* test for suggested reply

* fixed wrong import

* fixed selectors

* fixed selector

* fixed selector

* [#1914] Cypress test for conversation state (#2061)

* Bump terser-webpack-plugin from 5.1.3 to 5.1.4 (#2065)

* Bump terser-webpack-plugin from 5.1.3 to 5.1.4

Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 5.1.3 to 5.1.4.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/terser-webpack-plugin@v5.1.3...v5.1.4)

---
updated-dependencies:
- dependency-name: terser-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update bazel tools

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christoph Pröschel <chris@airy.co>
Co-authored-by: Christoph Proeschel <proeschel.christoph@gmail.com>

* Bump prettier from 2.3.1 to 2.3.2 (#2053)

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump core-js from 3.15.0 to 3.15.2 (#2064)

Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.15.0 to 3.15.2.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.15.2/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 15.12.2 to 15.12.5 (#2052)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.2 to 15.12.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump style-loader from 2.0.0 to 3.0.0 (#2040)

Bumps [style-loader](https://github.com/webpack-contrib/style-loader) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/style-loader@v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: style-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 4.28.0 to 4.28.1 (#2081)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.0 to 4.28.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [#1916] Cypress test for display name edit (#2088)

* adding handles for cy test

* feat/1916-cypress-test-for-name-edit

* rebase

* fixed base url

* [#2074] Added subtitle to Chatplugin (#2087)

* [#2069] fix http client and chat plugin packages (#2070)

* fixed http client and chat plugin packages

* fixed build file chat plugin

* fixed build rules for the chat plugin

* fixed typing for chat plugin

* started adding docs

* fixed readme for packages

* updated doc for chat plugin and httpclient

* update conversations counter in real time (#2091)

* [#2073] Added powered by airy to Chatplugin (#2089)

* added powered by airy to chatplugin

* change position

* linting

Co-authored-by: Aitor Algorta <aitor@airy.co>

* [#661] Added possibility to connect Google via UI (#2092)

* Bump webpack from 5.40.0 to 5.41.1 (#2085)

Bumps [webpack](https://github.com/webpack/webpack) from 5.40.0 to 5.41.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.40.0...v5.41.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/eslint-plugin from 4.28.0 to 4.28.1 (#2084)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.0 to 4.28.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [#2093] Fixed moving avatar (#2094)

* Bump webpack from 5.41.1 to 5.42.0 (#2098)

Bumps [webpack](https://github.com/webpack/webpack) from 5.41.1 to 5.42.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.41.1...v5.42.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump preact from 10.5.13 to 10.5.14 (#2099)

Bumps [preact](https://github.com/preactjs/preact) from 10.5.13 to 10.5.14.
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](preactjs/preact@10.5.13...10.5.14)

---
updated-dependencies:
- dependency-name: preact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump camelcase-keys from 6.2.2 to 7.0.0 (#2083)

Bumps [camelcase-keys](https://github.com/sindresorhus/camelcase-keys) from 6.2.2 to 7.0.0.
- [Release notes](https://github.com/sindresorhus/camelcase-keys/releases)
- [Commits](sindresorhus/camelcase-keys@v6.2.2...v7.0.0)

---
updated-dependencies:
- dependency-name: camelcase-keys
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [#2071] Redesigned inputbar Chatplugin (#2095)

* redesigned inputbar chatplugin

* made changed accordingly

* improvements in the input bar

Co-authored-by: Aitor Algorta <aitor@airy.co>

* Fixes #2100 - link to up-to-date Rasa connector (#2101)

* Bump @types/react from 17.0.11 to 17.0.13 (#2097)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 17.0.11 to 17.0.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 15.12.5 to 15.14.0 (#2096)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.5 to 15.14.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 15.14.0 to 16.0.0 (#2103)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.14.0 to 16.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint from 7.29.0 to 7.30.0 (#2102)

Bumps [eslint](https://github.com/eslint/eslint) from 7.29.0 to 7.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.29.0...v7.30.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [#1970] Add issue templates (#2106)

* [#2051] Add instagram source (#2082)

* [#2014] Fix stable version file (#2107)

* [#2072] Chat Plugin: Emoji Selector (#2121)

* emoji selector for chat plugin wip

* loading emojipicker async wip 2

* emoji picker for cp wip 3

* refined naming, typing, and added styling

* unstaged unecessary files

* fixed error

* fixed paperplane svg

* [#1590] Refactor: Split chatplugin into library and app targets (#2120)

* Bump @types/react-window-infinite-loader from 1.0.3 to 1.0.4 (#2130)

Bumps [@types/react-window-infinite-loader](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-window-infinite-loader) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-window-infinite-loader)

---
updated-dependencies:
- dependency-name: "@types/react-window-infinite-loader"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/eslint-plugin from 4.28.1 to 4.28.2 (#2112)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.1 to 4.28.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.2/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/resize-observer-browser from 0.1.5 to 0.1.6 (#2135)

Bumps [@types/resize-observer-browser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/resize-observer-browser) from 0.1.5 to 0.1.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/resize-observer-browser)

---
updated-dependencies:
- dependency-name: "@types/resize-observer-browser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Change endpoint for webhook to /twilio (#2123)

* [#2132] Allow deleting messages (#2136)

* Bump @types/react-router-dom from 5.1.7 to 5.1.8 (#2137)

Bumps [@types/react-router-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-router-dom) from 5.1.7 to 5.1.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-router-dom)

---
updated-dependencies:
- dependency-name: "@types/react-router-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 4.28.1 to 4.28.2 (#2113)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.1 to 4.28.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.2/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sass from 1.35.1 to 1.35.2 (#2141)

Bumps [sass](https://github.com/sass/dart-sass) from 1.35.1 to 1.35.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.35.1...1.35.2)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react-dom from 17.0.8 to 17.0.9 (#2146)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 17.0.8 to 17.0.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cypress from 7.6.0 to 7.7.0 (#2145)

Bumps [cypress](https://github.com/cypress-io/cypress) from 7.6.0 to 7.7.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](cypress-io/cypress@v7.6.0...v7.7.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react-redux from 7.1.16 to 7.1.18 (#2138)

Bumps [@types/react-redux](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-redux) from 7.1.16 to 7.1.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-redux)

---
updated-dependencies:
- dependency-name: "@types/react-redux"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [#2078] Add endpoint for uploading media (#2147)

* [#2149] UI crashes when filtering with unknown source involved  (#2152)

* fixed ui crash for unknown source

* added colorful ig icon

* release 0.26.0

Co-authored-by: Pascal Holy <pascal@airy.co>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christoph Proeschel <proeschel.christoph@gmail.com>
Co-authored-by: AudreyKj <38159391+AudreyKj@users.noreply.github.com>
Co-authored-by: Thorsten <thorsten@airy.co>
Co-authored-by: Christoph Pröschel <chris@airy.co>
Co-authored-by: Arman Jindal <58370547+armanjindal@users.noreply.github.com>
Co-authored-by: Ljupco Vangelski <ljupcovangelski@users.noreply.github.com>
Co-authored-by: Audrey Kadjar <audreykadjar@gmail.com>
  • Loading branch information
10 people committed Jul 13, 2021
1 parent b2c3401 commit c216d5d
Show file tree
Hide file tree
Showing 185 changed files with 2,673 additions and 2,604 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: "\U0001F41E Bug report"
about: Report a bug in Airy. If this doesn’t look right, [choose a different type](https://github.com/airyhq/airy/issues/new/choose).
title: ""
labels: bug
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. I installed Airy using '...'
2. When I ran command / did this in the UI
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. Chrome, Safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/---feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for Airy. If this doesn’t look right, [choose a different type](https://github.com/airyhq/airy/issues/new/choose).
title: ""
labels: feature, needs discussion
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ jobs:
run: |
echo ${{ secrets.PAT }} | docker login ghcr.io -u airydevci --password-stdin
./scripts/push-images.sh
- name: Install aws cli
uses: chrislennon/action-aws-cli@v1.1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

- name: Upload airy binary to S3
if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/release') || github.ref == 'refs/heads/main' }}
run: |
Expand All @@ -69,6 +71,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_BRANCH: ${{ github.ref }}

- name: Publish http-client library to npm
if: ${{ startsWith(github.ref, 'refs/heads/main') }}
run: |
Expand All @@ -78,6 +81,7 @@ jobs:
DEPLOY_NPM_USERNAME: ${{ secrets.DEPLOY_NPM_USERNAME }}
DEPLOY_NPM_PASSWORD: ${{ secrets.DEPLOY_NPM_PASSWORD }}
DEPLOY_NPM_EMAIL: ${{ secrets.DEPLOY_NPM_EMAIL }}

- name: Publish chat-plugin library to npm
if: ${{ startsWith(github.ref, 'refs/heads/main') }}
run: |
Expand All @@ -87,4 +91,3 @@ jobs:
DEPLOY_NPM_USERNAME: ${{ secrets.DEPLOY_NPM_USERNAME }}
DEPLOY_NPM_PASSWORD: ${{ secrets.DEPLOY_NPM_PASSWORD }}
DEPLOY_NPM_EMAIL: ${{ secrets.DEPLOY_NPM_EMAIL }}
GITHUB_BRANCH: ${{ github.ref }}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.25.0
0.26.0
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Airy Bazel tools
git_repository(
name = "com_github_airyhq_bazel_tools",
commit = "b4f52101d80c342ff5e4734fb4c4385af921ffec",
commit = "2b34bc2b2c6fed64e4bb223d4624e06eda390e4d",
remote = "https://github.com/airyhq/bazel-tools.git",
shallow_since = "1624959927 +0200",
shallow_since = "1625065439 +0200",
)

load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.kstream.KGroupedStream;
import org.apache.kafka.streams.kstream.KGroupedTable;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.KTable;
import org.apache.kafka.streams.kstream.Materialized;
Expand Down Expand Up @@ -103,8 +104,8 @@ private void startStream() {
.mapValues(readReceipt -> CountAction.reset(readReceipt.getReadDate()));

// produce unread count metadata
messageStream.selectKey((messageId, message) -> message.getConversationId())
.filter((conversationId, message) -> message.getIsFromContact())
messageStream.filter((conversationId, message) -> message != null && message.getIsFromContact())
.selectKey((messageId, message) -> message.getConversationId())
.mapValues(message -> CountAction.increment(message.getSentAt()))
.merge(resetStream)
.groupByKey()
Expand All @@ -127,25 +128,26 @@ private void startStream() {
})
.to(applicationCommunicationMetadata);

final KGroupedStream<String, MessageContainer> messageGroupedStream = messageStream.toTable()
final KGroupedTable<String, MessageContainer> messageGroupedTable = messageStream.toTable()
.leftJoin(metadataTable, (message, metadataMap) -> MessageContainer.builder()
.message(message)
.metadataMap(Optional.ofNullable(metadataMap).orElse(new MetadataMap()))
.build(), Materialized.as(messagesByIdStore))
.toStream()
.filter((messageId, messageContainer) -> messageContainer != null)
.groupBy((messageId, messageContainer) -> messageContainer.getMessage().getConversationId());
.groupBy((messageId, messageContainer) -> KeyValue.pair(messageContainer.getMessage().getConversationId(), messageContainer));


// messages store
messageGroupedStream.aggregate(MessagesTreeSet::new,
((key, value, aggregate) -> {
messageGroupedTable.aggregate(MessagesTreeSet::new,
(key, value, aggregate) -> {
aggregate.update(value);
return aggregate;
}), Materialized.as(messagesStore));
}, (key, value, aggregate) -> {
aggregate.remove(value);
return aggregate;
}, Materialized.as(messagesStore));

// Conversation stores
messageGroupedStream
messageGroupedTable
.aggregate(Conversation::new,
(conversationId, container, aggregate) -> {
if (aggregate.getLastMessageContainer() == null) {
Expand All @@ -164,6 +166,10 @@ private void startStream() {
aggregate.setSourceConversationId(container.getMessage().getSenderId());
}

return aggregate;
}, (conversationId, container, aggregate) -> {
// If the deleted message was the last message we have no way of replacing it
// so we have no choice but to keep it
return aggregate;
})
.join(channelTable, Conversation::getChannelId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import co.airy.kafka.test.junit.SharedKafkaTestResource;
import co.airy.spring.core.AirySpringBootApplication;
import co.airy.spring.test.WebTestHelper;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.avro.specific.SpecificRecordBase;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.junit.jupiter.api.AfterAll;
Expand Down Expand Up @@ -102,6 +104,33 @@ void canFetchMessages() throws Exception {
"/messages.list endpoint error");
}

@Test
void canDeleteMessages() throws Exception {
final String conversationId = UUID.randomUUID().toString();

int messageCount = 2;
final List<ProducerRecord<String, SpecificRecordBase>> records = TestConversation.generateRecords(conversationId, channel, 2);
kafkaTestHelper.produceRecords(records);

final String payload = "{\"conversation_id\":\"" + conversationId + "\"}";
retryOnException(
() -> {
final String content = webTestHelper.post("/messages.list", payload)
.andExpect(status().isOk())
.andExpect(jsonPath("$.data", hasSize(messageCount)))
.andReturn().getResponse().getContentAsString();

final JsonNode jsonNode = new ObjectMapper().readTree(content);
final String messageId = jsonNode.get("data").get(0).get("id").textValue();

kafkaTestHelper.produceRecord(new ProducerRecord<>(applicationCommunicationMessages.name(), messageId, null));

webTestHelper.post("/messages.list", payload)
.andExpect(status().isOk())
.andExpect(jsonPath("$.data", hasSize(messageCount - 1)));
}, "message was not deleted");
}

@Test
void canReturnMetadata() throws Exception {
final String conversationId = UUID.randomUUID().toString();
Expand Down Expand Up @@ -173,7 +202,6 @@ void canReturnTwilioMessagesUnparsed() throws Exception {
final String conversationId = UUID.randomUUID().toString();
final String messageId = UUID.randomUUID().toString();
final String sourceConversationId = "+491234567";
final String text = "Hello World";
final String sourceChannelId = "+497654321";
final String token = "token";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@
import static co.airy.core.api.communication.util.Topics.applicationCommunicationChannels;
import static co.airy.core.api.communication.util.Topics.applicationCommunicationMessages;
import static co.airy.core.api.communication.util.Topics.getTopics;
import static co.airy.test.Timing.retryOnException;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
import static org.hamcrest.core.Is.is;
import static org.junit.jupiter.api.Assertions.fail;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = AirySpringBootApplication.class)
Expand Down Expand Up @@ -86,6 +89,13 @@ void canSendTextMessages() throws Exception {
"\"message\":%s}",
conversationId, messagePayload);

retryOnException(
() -> webTestHelper.post("/conversations.info",
"{\"conversation_id\":\"" + conversationId + "\"}")
.andExpect(status().isOk()),
"Could not find conversation"
);

final String response = webTestHelper.post("/messages.send", requestPayload)
.andExpect(status().isOk())
.andReturn().getResponse().getContentAsString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public class WebSocketController {
}

public void onMessage(Message message) {
messagingTemplate.convertAndSend(QUEUE_EVENTS, MessageEvent.fromMessage(message));
if (message != null) {
messagingTemplate.convertAndSend(QUEUE_EVENTS, MessageEvent.fromMessage(message));
}
}

public void onChannel(Channel channel) {
Expand Down
6 changes: 2 additions & 4 deletions backend/media/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ app_deps = [
"//backend:base_app",
"//backend/model/message",
"//backend/model/metadata",
"//lib/java/mapping",
"//lib/java/uuid",
"//lib/java/url",
"//lib/java/spring/kafka/core:spring-kafka-core",
"//lib/java/spring/kafka/streams:spring-kafka-streams",
"@maven//:javax_xml_bind_jaxb_api",
"//lib/java/spring/web:spring-web",
"@maven//:org_springframework_retry_spring_retry",
"@maven//:org_aspectj_aspectjweaver",
"@maven//:com_amazonaws_aws_java_sdk_core",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package co.airy.core.media;

import co.airy.core.media.services.MediaUpload;
import co.airy.log.AiryLoggerFactory;
import co.airy.spring.web.payload.RequestErrorResponsePayload;
import co.airy.uuid.UUIDv5;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.slf4j.Logger;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;

@RestController
public class MediaController {
private static final Logger log = AiryLoggerFactory.getLogger(MediaController.class);
private final MediaUpload mediaUpload;

public MediaController(MediaUpload mediaUpload) {
this.mediaUpload = mediaUpload;
}


@PostMapping(value = "/media.uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<?> mediaUpload(@RequestParam("file") MultipartFile multipartFile) {
final String originalFileName = multipartFile.getOriginalFilename();

if (originalFileName == null) {
return ResponseEntity.unprocessableEntity().body(new RequestErrorResponsePayload("Request is missing original file name"));
}

try {
final InputStream is = multipartFile.getInputStream();
String fileName = UUIDv5.fromFile(is).toString();

final String originalFileExtension = originalFileName.contains(".") ? originalFileName.substring(originalFileName.lastIndexOf(".")) : "";
fileName = fileName.concat(originalFileExtension);

return ResponseEntity.ok(new MediaUploadResponsePayload(mediaUpload.uploadMedia(is, fileName)));
} catch (Exception e) {
log.error("Media upload failed:", e);
return ResponseEntity.badRequest().body(new RequestErrorResponsePayload(String.format("Media Upload failed with error: %s", e.getMessage())));
}
}
}

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
class MediaUploadResponsePayload {
private String mediaUrl;
}

Loading

0 comments on commit c216d5d

Please sign in to comment.