|
@@ -264,7 +264,7 @@ class WhatsAppAccount(models.Model):
|
|
|
if not group_metadata and value.get("metadata", {}).get("group_id"):
|
|
if not group_metadata and value.get("metadata", {}).get("group_id"):
|
|
|
group_metadata = {"id": value.get("metadata", {}).get("group_id")}
|
|
group_metadata = {"id": value.get("metadata", {}).get("group_id")}
|
|
|
|
|
|
|
|
- if not channel and group_metadata:
|
|
|
|
|
|
|
+ if group_metadata:
|
|
|
# Check if group module is installed (Use 'in' operator for models with dots)
|
|
# Check if group module is installed (Use 'in' operator for models with dots)
|
|
|
if "ww.group" in self.env:
|
|
if "ww.group" in self.env:
|
|
|
# Process Group (Lazy Create + Organic Member Add)
|
|
# Process Group (Lazy Create + Organic Member Add)
|
|
@@ -272,7 +272,7 @@ class WhatsAppAccount(models.Model):
|
|
|
self, group_metadata, sender_partner
|
|
self, group_metadata, sender_partner
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- if group and group.channel_id:
|
|
|
|
|
|
|
+ if group and group.channel_id and not channel:
|
|
|
channel = group.channel_id
|
|
channel = group.channel_id
|
|
|
_logger.info(
|
|
_logger.info(
|
|
|
"Mensaje de grupo ruteado a canal: %s", channel.name
|
|
"Mensaje de grupo ruteado a canal: %s", channel.name
|