aboutsummaryrefslogtreecommitdiff
path: root/connector/connector.go
diff options
context:
space:
mode:
Diffstat (limited to 'connector/connector.go')
-rw-r--r--connector/connector.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/connector/connector.go b/connector/connector.go
index 38ce828..e8c382d 100644
--- a/connector/connector.go
+++ b/connector/connector.go
@@ -59,8 +59,14 @@ type Connector interface {
// Leave a channel
Leave(roomId RoomID)
- // Send an event
- Send(event *Event) error
+ // Send an event. Returns the ID of the created remote message.
+ // This ID is used to deduplicate messages: if it comes back, it should have the same Id
+ // than the one returned here.
+ // For backends that do not implement IDs (e.g. IRC), an empty string is returned.
+ // (FIXME how to deduplicate IRC messages?)
+ // The event that is fed in this function may have its ID already set,
+ // in which case the backend is free to re-use the ID or select a new one.
+ Send(event *Event) (string, error)
// Close the connection
Close()