fix: WhatsApp channel_conv_id als nummer@c.us normalisieren beim Senden
This commit is contained in:
@@ -51,6 +51,10 @@ async def send(db: Session, req: SendMessageRequest) -> Message:
|
|||||||
else:
|
else:
|
||||||
recipient_id = req.recipient_phone
|
recipient_id = req.recipient_phone
|
||||||
contact = contact_service.get_or_create_by_phone(db, recipient_id)
|
contact = contact_service.get_or_create_by_phone(db, recipient_id)
|
||||||
|
# WhatsApp: channel_conv_id immer als "nummer@c.us" normalisieren
|
||||||
|
if req.channel == "whatsapp":
|
||||||
|
channel_conv_id = recipient_id.replace("@c.us", "").lstrip("+") + "@c.us"
|
||||||
|
else:
|
||||||
channel_conv_id = recipient_id
|
channel_conv_id = recipient_id
|
||||||
|
|
||||||
conv = conversation_service.get_or_create(
|
conv = conversation_service.get_or_create(
|
||||||
|
|||||||
Reference in New Issue
Block a user