[FIX] im_livechat: fix channel member service patch
This commit fixes several issues with the channel member service patch: - patch should be applied to prototype - super should be provided the params given to the patch closes odoo/odoo#127349 Signed-off-by: Didier Debondt (did) <did@odoo.com>
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
import { ChannelMemberService } from "@mail/core/common/channel_member_service";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(ChannelMemberService, "im_livechat", {
|
||||
patch(ChannelMemberService.prototype, "im_livechat", {
|
||||
getName(member) {
|
||||
if (member.thread.type !== "livechat") {
|
||||
return this._super();
|
||||
return this._super(member);
|
||||
}
|
||||
if (member.persona.user_livechat_username) {
|
||||
return member.persona.user_livechat_username;
|
||||
@@ -14,6 +14,6 @@ patch(ChannelMemberService, "im_livechat", {
|
||||
if (member.persona.is_public) {
|
||||
return member.thread.anonymous_name;
|
||||
}
|
||||
return this._super();
|
||||
return this._super(member);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user