Any interest in adding a receipt client function to send receipts using the API endpoints
e.g.
diff --git a/client.go b/client.go
index 7725ac3..2819d8d 100644
--- a/client.go
+++ b/client.go
@@ -449,6 +449,13 @@ func (cli *Client) SendMessageEvent(roomID string, eventType string, contentJSON
return
}
+func (cli *Client) Receipt(roomID, receiptType, eventID string, req *ReqReceipt) (resp *RespReceipt, err error) {
+ urlPath := cli.BuildURL("rooms", roomID, "receipt", receiptType, eventID)
+ _, err = cli.MakeRequest("POST", urlPath, req, nil)
+ return
+}
+
+
// SendStateEvent sends a state event into a room. See http://matrix.org/docs/spec/client_server/r0.2.0.html#put-matrix-client-r0-rooms-roomid-state-eventtype-statekey
// contentJSON should be a pointer to something that can be encoded as JSON using json.Marshal.
func (cli *Client) SendStateEvent(roomID, eventType, stateKey string, contentJSON interface{}) (resp *RespSendEvent, err error) {
diff --git a/requests.go b/requests.go
index af99a22..f044fff 100644
--- a/requests.go
+++ b/requests.go
@@ -76,3 +76,6 @@ type ReqTyping struct {
Typing bool `json:"typing"`
Timeout int64 `json:"timeout"`
}
+
+type ReqReceipt struct {
+}
diff --git a/responses.go b/responses.go
index fe0eeb3..8539969 100644
--- a/responses.go
+++ b/responses.go
@@ -174,3 +174,6 @@ type RespTurnServer struct {
TTL int `json:"ttl"`
URIs []string `json:"uris"`
}
+
+type RespReceipt struct {
+}
Any interest in adding a receipt client function to send receipts using the API endpoints
e.g.
Happy to cleanup and submit this as a PR if it seems reasonable