addons/portal_rating/static/src/chatter/frontend/store_service_patch.js
raw| 1 | import { Store } from "@mail/core/common/store_service"; |
| 2 | |
| 3 | import { patch } from "@web/core/utils/patch"; |
| 4 | |
| 5 | patch(Store.prototype, { |
| 6 | async getMessagePostParams({ postData }) { |
| 7 | const params = await super.getMessagePostParams(...arguments); |
| 8 | if (postData.rating_value) { |
| 9 | params.post_data.rating_value = postData.rating_value; |
| 10 | } |
| 11 | return params; |
| 12 | }, |
| 13 | }); |