(20250128) Handling Null in WhatsApp Nimbus's 'msg' field.

This commit is contained in:
2025-01-28 13:29:06 +05:30
parent 48753dd617
commit b45bd4faf7
2 changed files with 9 additions and 7 deletions
@@ -99,9 +99,10 @@ class NimbusWhatsappSendMessageResponse(BaseModel):
frozen = True
)
message: str = Field(
message: str | None = Field(
description = "The actual message to send to the recipient(s).",
frozen = True
frozen = True,
default = None
)
pdfUrl: str | None = Field(
@@ -206,7 +207,7 @@ class NimbusWhatsappSendMessageResponse(BaseModel):
# Start with the bare minimum:
api_input = {
"mobile": ",".join(self.recipientNo),
"msg": self.message
"msg": self.message or " "
}
# Add the optional media elements: