From b922e56343e866a06fd8c8e25f8abde288a848fe Mon Sep 17 00:00:00 2001
From: Till Faelligen <tfaelligen@gmail.com>
Date: Fri, 16 Oct 2020 15:39:38 +0200
Subject: [PATCH] - Add TODO for batching requests - Rename variable

---
 eduserver/api/wrapper.go | 4 ++--
 eduserver/input/input.go | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/eduserver/api/wrapper.go b/eduserver/api/wrapper.go
index 7b45ee0b4..7907f4d39 100644
--- a/eduserver/api/wrapper.go
+++ b/eduserver/api/wrapper.go
@@ -71,7 +71,7 @@ func SendToDevice(
 // SendReceipt sends a receipt event to EDU Server
 func SendReceipt(
 	ctx context.Context,
-	eduAPI EDUServerInputAPI, userID, roomID, eventID, eventType string,
+	eduAPI EDUServerInputAPI, userID, roomID, eventID, receiptType string,
 	timestamp gomatrixserverlib.Timestamp,
 ) error {
 	request := InputReceiptEventRequest{
@@ -79,7 +79,7 @@ func SendReceipt(
 			UserID:    userID,
 			RoomID:    roomID,
 			EventID:   eventID,
-			Type:      eventType,
+			Type:      receiptType,
 			Timestamp: timestamp,
 		},
 	}
diff --git a/eduserver/input/input.go b/eduserver/input/input.go
index c4b43c2c9..c54fb9de8 100644
--- a/eduserver/input/input.go
+++ b/eduserver/input/input.go
@@ -177,6 +177,7 @@ func (t *EDUServerInputAPI) sendToDeviceEvent(ise *api.InputSendToDeviceEvent) e
 }
 
 // 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(
 	ctx context.Context,
 	request *api.InputReceiptEventRequest,