- Add TODO for batching requests
- Rename variable
This commit is contained in:
parent
3796b22423
commit
b922e56343
|
@ -71,7 +71,7 @@ func SendToDevice(
|
||||||
// SendReceipt sends a receipt event to EDU Server
|
// SendReceipt sends a receipt event to EDU Server
|
||||||
func SendReceipt(
|
func SendReceipt(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
eduAPI EDUServerInputAPI, userID, roomID, eventID, eventType string,
|
eduAPI EDUServerInputAPI, userID, roomID, eventID, receiptType string,
|
||||||
timestamp gomatrixserverlib.Timestamp,
|
timestamp gomatrixserverlib.Timestamp,
|
||||||
) error {
|
) error {
|
||||||
request := InputReceiptEventRequest{
|
request := InputReceiptEventRequest{
|
||||||
|
@ -79,7 +79,7 @@ func SendReceipt(
|
||||||
UserID: userID,
|
UserID: userID,
|
||||||
RoomID: roomID,
|
RoomID: roomID,
|
||||||
EventID: eventID,
|
EventID: eventID,
|
||||||
Type: eventType,
|
Type: receiptType,
|
||||||
Timestamp: timestamp,
|
Timestamp: timestamp,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,7 @@ func (t *EDUServerInputAPI) sendToDeviceEvent(ise *api.InputSendToDeviceEvent) e
|
||||||
}
|
}
|
||||||
|
|
||||||
// InputReceiptEvent implements api.EDUServerInputAPI
|
// InputReceiptEvent implements api.EDUServerInputAPI
|
||||||
|
// TODO: Intelligently batch requests sent by the same user (e.g wait a few milliseconds before emitting output events)
|
||||||
func (t *EDUServerInputAPI) InputReceiptEvent(
|
func (t *EDUServerInputAPI) InputReceiptEvent(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
request *api.InputReceiptEventRequest,
|
request *api.InputReceiptEventRequest,
|
||||||
|
|
Loading…
Reference in a new issue