mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Add wrapper for /read_markers endpoint
This commit is contained in:
parent
66726fa3ee
commit
6d9d537973
2 changed files with 11 additions and 0 deletions
|
|
@ -1353,6 +1353,12 @@ func (cli *Client) MarkReadWithContent(roomID id.RoomID, eventID id.EventID, con
|
|||
return
|
||||
}
|
||||
|
||||
func (cli *Client) SetReadMarkers(roomID id.RoomID, content interface{}) (err error) {
|
||||
urlPath := cli.BuildURL("rooms", roomID, "read_markers")
|
||||
_, err = cli.MakeRequest("POST", urlPath, &content, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func (cli *Client) AddTag(roomID id.RoomID, tag string, order float64) error {
|
||||
var tagData event.Tag
|
||||
if order == order {
|
||||
|
|
|
|||
|
|
@ -319,3 +319,8 @@ type ReqBatchSend struct {
|
|||
StateEventsAtStart []*event.Event `json:"state_events_at_start"`
|
||||
Events []*event.Event `json:"events"`
|
||||
}
|
||||
|
||||
type ReqSetReadMarkers struct {
|
||||
Read id.EventID `json:"m.read"`
|
||||
FullyRead id.EventID `json:"m.fully_read"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue