From 7daf90b89f39e74b5fd596e8d716bd6b2c03ed23 Mon Sep 17 00:00:00 2001 From: lin Date: Sat, 25 Dec 2021 21:09:10 +0900 Subject: [PATCH] change request body nil to empty struct Request Body requires an empty JSON See https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-rooms-roomid-receipt-receipttype-eventid --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index d0bb0c5..aa9e7e2 100644 --- a/client.go +++ b/client.go @@ -591,7 +591,7 @@ func (cli *Client) RedactEvent(roomID, eventID string, req *ReqRedact) (resp *Re // MarkRead marks eventID in roomID as read, signifying the event, and all before it have been read. See https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-rooms-roomid-receipt-receipttype-eventid func (cli *Client) MarkRead(roomID, eventID string) error { urlPath := cli.BuildURL("rooms", roomID, "receipt", "m.read", eventID) - return cli.MakeRequest("POST", urlPath, nil, nil) + return cli.MakeRequest("POST", urlPath, struct{}{}, nil) } // CreateRoom creates a new Matrix room. See https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom