aboutsummaryrefslogtreecommitdiff
path: root/clientapi/producers
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-05-01 10:48:17 +0100
committerGitHub <noreply@github.com>2020-05-01 10:48:17 +0100
commite15f6676ac3f76ec2ef679c2df300d6a8e7e668f (patch)
tree0b82339939e8932d46e1ca2cf6024ab55dc7602f /clientapi/producers
parentebbfc125920beb321713e28a2a137d768406fa15 (diff)
Consolidation of roomserver APIs (#994)
* Consolidation of roomserver APIs * Comment out alias tests for now, they are broken * Wire AS API into roomserver again * Roomserver didn't take asAPI param before so return to that * Prevent roomserver asking AS API for alias info * Rename some files * Remove alias_test, incoherent tests and unwanted appservice integration * Remove FS API inject on syncapi component
Diffstat (limited to 'clientapi/producers')
-rw-r--r--clientapi/producers/roomserver.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/clientapi/producers/roomserver.go b/clientapi/producers/roomserver.go
index fac1e3c7..a804abfe 100644
--- a/clientapi/producers/roomserver.go
+++ b/clientapi/producers/roomserver.go
@@ -23,15 +23,13 @@ import (
// RoomserverProducer produces events for the roomserver to consume.
type RoomserverProducer struct {
- InputAPI api.RoomserverInputAPI
- QueryAPI api.RoomserverQueryAPI
+ RsAPI api.RoomserverInternalAPI
}
// NewRoomserverProducer creates a new RoomserverProducer
-func NewRoomserverProducer(inputAPI api.RoomserverInputAPI, queryAPI api.RoomserverQueryAPI) *RoomserverProducer {
+func NewRoomserverProducer(rsAPI api.RoomserverInternalAPI) *RoomserverProducer {
return &RoomserverProducer{
- InputAPI: inputAPI,
- QueryAPI: queryAPI,
+ RsAPI: rsAPI,
}
}
@@ -95,7 +93,7 @@ func (c *RoomserverProducer) SendInputRoomEvents(
) (eventID string, err error) {
request := api.InputRoomEventsRequest{InputRoomEvents: ires}
var response api.InputRoomEventsResponse
- err = c.InputAPI.InputRoomEvents(ctx, &request, &response)
+ err = c.RsAPI.InputRoomEvents(ctx, &request, &response)
eventID = response.EventID
return
}
@@ -118,5 +116,5 @@ func (c *RoomserverProducer) SendInvite(
}},
}
var response api.InputRoomEventsResponse
- return c.InputAPI.InputRoomEvents(ctx, &request, &response)
+ return c.RsAPI.InputRoomEvents(ctx, &request, &response)
}