diff --git a/webapp/package-lock.json b/webapp/package-lock.json index dfa4947f..9707c82b 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -7,7 +7,7 @@ "dependencies": { "core-js": "3.6.5", "js-cookie": "2.2.1", - "mattermost-redux": "10.9.0", + "mattermost-redux": "11.4.0", "react": "18.2.0", "react-bootstrap": "0.33.1", "react-dom": "18.2.0", @@ -30,8 +30,8 @@ "@babel/runtime": "7.28.6", "@emotion/babel-preset-css-prop": "10.0.27", "@emotion/core": "10.0.28", - "@mattermost/client": "10.9.0", - "@mattermost/types": "10.9.0", + "@mattermost/client": "11.4.0", + "@mattermost/types": "11.4.0", "@testing-library/jest-dom": "6.4.0", "@testing-library/react": "14.2.1", "@testing-library/user-event": "14.5.2", @@ -3107,12 +3107,12 @@ } }, "node_modules/@mattermost/client": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@mattermost/client/-/client-10.9.0.tgz", - "integrity": "sha512-P5b6zF0YIY+DhG25U8Q4ctlRgLZHyWZodgBsVsVY9Riwl0gDA96XmREd55P180MddCzJhRGNQg4UmAjxcqewlQ==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@mattermost/client/-/client-11.4.0.tgz", + "integrity": "sha512-QzYIpxFRPA+NDCCxk9bPwnFRpgZq8d1KKYXic8AJJiPXjja6IJDOkpDfGgo4b1q0AofUQ+u7Js3Fh2mxerwz5g==", "license": "MIT", "peerDependencies": { - "@mattermost/types": "10.9.0", + "@mattermost/types": "11.4.0", "typescript": "^4.3.0 || ^5.0.0" }, "peerDependenciesMeta": { @@ -3122,9 +3122,9 @@ } }, "node_modules/@mattermost/types": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/@mattermost/types/-/types-10.9.0.tgz", - "integrity": "sha512-2795KUkp2EkuJ9NVohPkJmrgKunt6OZiLyo8zUoIWPJjxQ0upjiWJz/KenABx38v8+QfpSEN8tZSBN3lsZCueg==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@mattermost/types/-/types-11.4.0.tgz", + "integrity": "sha512-oYt7vvsa60hPpujcCBYeyd+22OwprEAtFXgVJrsdd9pR1qkEGU4F+uv8bh6ZTBSZAQnc2/xXQPZJGGR06toteA==", "license": "MIT", "peerDependencies": { "typescript": "^4.3.0 || ^5.0.0" @@ -9896,19 +9896,19 @@ } }, "node_modules/mattermost-redux": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/mattermost-redux/-/mattermost-redux-10.9.0.tgz", - "integrity": "sha512-dbUV7QQheDMT5ONK9TbGzn4P8AXrHQzJ6Uk/v8zw1ZxMenze08lgwHDUycLyPLCFX4e6CyHXhJ6r+E6mgBL1nA==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/mattermost-redux/-/mattermost-redux-11.4.0.tgz", + "integrity": "sha512-EPBuTS4rfL3ClPOItUTGJad9vRKL4GRZu3X7MC2ctJzGZzzvK7kg3fXjp/vV0w1IizNmoGhGURu6V/ZqHI/TWQ==", "license": "MIT", "dependencies": { - "@mattermost/client": "10.9.0", - "@mattermost/types": "10.9.0", - "@redux-devtools/extension": "^3.2.3", + "@mattermost/client": "11.4.0", + "@mattermost/types": "11.4.0", + "@redux-devtools/extension": "3.3.0", "lodash": "^4.17.21", "moment-timezone": "^0.5.38", - "redux": "^4.2.0", - "redux-batched-actions": "^0.5.0", - "redux-thunk": "^2.4.2", + "redux": "^5.0.0", + "redux-batched-actions": "0.5.0", + "redux-thunk": "^3.0.0", "serialize-error": "^11.0.3", "shallow-equals": "^1.0.0", "timezones.json": "^1.7.1" @@ -9922,24 +9922,6 @@ } } }, - "node_modules/mattermost-redux/node_modules/redux": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.9.2" - } - }, - "node_modules/mattermost-redux/node_modules/redux-thunk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.2.tgz", - "integrity": "sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q==", - "license": "MIT", - "peerDependencies": { - "redux": "^4" - } - }, "node_modules/memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", @@ -11383,6 +11365,15 @@ "redux": ">=1.0.0" } }, + "node_modules/redux-thunk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", + "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", + "license": "MIT", + "peerDependencies": { + "redux": "^5.0.0" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", diff --git a/webapp/package.json b/webapp/package.json index 106231e2..77648c73 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -25,8 +25,8 @@ "@babel/runtime": "7.28.6", "@emotion/babel-preset-css-prop": "10.0.27", "@emotion/core": "10.0.28", - "@mattermost/client": "10.9.0", - "@mattermost/types": "10.9.0", + "@mattermost/client": "11.4.0", + "@mattermost/types": "11.4.0", "@testing-library/jest-dom": "6.4.0", "@testing-library/react": "14.2.1", "@testing-library/user-event": "14.5.2", @@ -63,7 +63,7 @@ "dependencies": { "core-js": "3.6.5", "js-cookie": "2.2.1", - "mattermost-redux": "10.9.0", + "mattermost-redux": "11.4.0", "react": "18.2.0", "react-bootstrap": "0.33.1", "react-dom": "18.2.0", diff --git a/webapp/src/hooks/index.js b/webapp/src/hooks/index.js index b335b9c0..4955000d 100644 --- a/webapp/src/hooks/index.js +++ b/webapp/src/hooks/index.js @@ -28,7 +28,7 @@ export default class Hooks { const user = getCurrentUser(state); if (commandTrimmed && commandTrimmed === '/confluence subscribe') { - const {data: subscriptionAccessData, error} = await this.store.dispatch(getSubscriptionAccess()); + const {data: subscriptionAccessData, error} = await getSubscriptionAccess()(this.store.dispatch); if (error) { this.store.dispatch(sendEphemeralPost(Constants.ERROR_EXECUTING_COMMAND, contextArgs.channel_id, user.id)); @@ -41,10 +41,10 @@ export default class Hooks { return Promise.resolve({}); } - this.store.dispatch(openSubscriptionModal()); + openSubscriptionModal()(this.store.dispatch); return Promise.resolve({}); } else if (commandTrimmed && commandTrimmed.startsWith('/confluence edit')) { - const {data: subscriptionAccessData, error} = await this.store.dispatch(getSubscriptionAccess()); + const {data: subscriptionAccessData, error} = await getSubscriptionAccess()(this.store.dispatch); if (error) { this.store.dispatch(sendEphemeralPost(Constants.ERROR_EXECUTING_COMMAND, contextArgs.channel_id, user.id)); @@ -62,7 +62,7 @@ export default class Hooks { this.store.dispatch(sendEphemeralPost(Constants.SPECIFY_ALIAS, contextArgs.channel_id, user.id)); } else { const alias = args.slice(2).join(' '); - this.store.dispatch(getChannelSubscription(contextArgs.channel_id, alias, user.id)); + getChannelSubscription(contextArgs.channel_id, alias, user.id)(this.store.dispatch); } return Promise.resolve({}); }