Kaynağa Gözat

chore: commit pending changes before subtree update

odoo 3 ay önce
ebeveyn
işleme
2100f4a10a
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      models/whatsapp_account.py

+ 2 - 2
models/whatsapp_account.py

@@ -264,7 +264,7 @@ class WhatsAppAccount(models.Model):
             if not group_metadata and 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)
                 if "ww.group" in self.env:
                     # Process Group (Lazy Create + Organic Member Add)
@@ -272,7 +272,7 @@ class WhatsAppAccount(models.Model):
                         self, group_metadata, sender_partner
                     )
 
-                    if group and group.channel_id:
+                    if group and group.channel_id and not channel:
                         channel = group.channel_id
                         _logger.info(
                             "Mensaje de grupo ruteado a canal: %s", channel.name