19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:56 +01:00
parent a2f74aefd8
commit 4a4d12c333
844 changed files with 212348 additions and 270090 deletions

View file

@ -0,0 +1,39 @@
import { Chatter } from "@mail/chatter/web_portal/chatter";
import { useSubEnv } from "@odoo/owl";
import { patch } from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";
patch(Chatter.prototype, {
setup() {
super.setup(...arguments);
Object.assign(this.state, {
isFollower: this.props.isFollower,
});
this.orm = useService("orm");
useSubEnv({
// 'inFrontendPortalChatter' is specific to the frontend portal chatters
// and should not be set to 'true' in the project sharing chatter environment.
projectSharingId: this.props.projectSharingId,
});
},
async toggleIsFollower() {
this.state.isFollower = await this.orm.call(
this.props.threadModel,
"project_sharing_toggle_is_follower",
[this.props.threadId]
);
},
onPostCallback() {
super.onPostCallback();
this.state.isFollower = true;
},
});
Chatter.props = [
...Chatter.props,
"token",
"projectSharingId",
"isFollower",
"displayFollowButton",
];