Skip to content

Commit 6c59b75

Browse files
author
Daksh
committed
upadte testst
1 parent ae962ba commit 6c59b75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stream_chat/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def _make_request(
9898

9999
url = f"{self.base_url}/{relative_url}"
100100

101-
if method.__name__ in ["post", "put", "patch", "delete"]:
101+
if method.__name__ in ["post", "put", "patch"] or (
102+
method.__name__ == "delete" and data
103+
):
102104
serialized = json.dumps(data)
103105

104106
response = method(
@@ -360,7 +362,7 @@ def delete_message(
360362

361363
params = options.copy()
362364
if delete_for_me:
363-
# Send acting user in the request body for server-side auth compatibility
365+
# Send in body with acting user for server-side auth compatibility
364366
body = {"delete_for_me": True, "user": {"id": deleted_by}}
365367
return self.delete(f"messages/{message_id}", None, body)
366368
if deleted_by:

0 commit comments

Comments
 (0)