Skip to content

Commit

Permalink
Merge pull request #132 from elliot-100/131-type-hints-and-docstrings…
Browse files Browse the repository at this point in the history
…-in-spondsend_message-are-incorrect-for-optional-params-user-group_uid-chat_id

fix: docstrings in spond.send_message() are incorrect for optional params
  • Loading branch information
elliot-100 authored Jun 13, 2024
2 parents 1935de1 + 9aec497 commit f424d53
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions spond/spond.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ async def _continue_chat(self, chat_id: str, text: str):
return await r.json()

@_SpondBase.require_authentication
async def send_message(self, text: str, user=None, group_uid=None, chat_id=None):
async def send_message(
self,
text: str,
user: Optional[str] = None,
group_uid: Optional[str] = None,
chat_id: Optional[str] = None,
):
"""
Start a new chat or continue an existing one.
Expand All @@ -159,14 +165,14 @@ async def send_message(self, text: str, user=None, group_uid=None, chat_id=None)
Parameters
----------
text: str
text : str
Message to send
user : str
user : str, optional
Identifier to match against member/guardian's id, email, full name, or
profile id.
group_uid : str
group_uid : str, optional
UID of the group.
chat_id : str
chat_id : str, optional
Identifier of the chat.
Returns
Expand Down

0 comments on commit f424d53

Please sign in to comment.