mirror of https://github.com/matrix-org/gomatrix
MarkRead method for // 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 (#81)
This commit is contained in:
parent
9523b90244
commit
5891715dc5
|
@ -578,6 +578,12 @@ func (cli *Client) RedactEvent(roomID, eventID string, req *ReqRedact) (resp *Re
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
|
||||||
// CreateRoom creates a new Matrix room. See https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom
|
// CreateRoom creates a new Matrix room. See https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-createroom
|
||||||
// resp, err := cli.CreateRoom(&gomatrix.ReqCreateRoom{
|
// resp, err := cli.CreateRoom(&gomatrix.ReqCreateRoom{
|
||||||
// Preset: "public_chat",
|
// Preset: "public_chat",
|
||||||
|
|
Loading…
Reference in New Issue