diff options
author | devonh <devon.dmytro@gmail.com> | 2023-05-31 15:27:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 15:27:08 +0000 |
commit | cbdc601f1b6d1c2a648b69ff44b3a49916f4d31a (patch) | |
tree | 6d14c55508579211e3833cab60cfdfea3fab04a6 /internal | |
parent | 61341aca500ec4d87e5b6d4c3f965c3836d6e6d6 (diff) |
Move CreateRoom logic to Roomserver (#3093)
Move create room logic over to roomserver.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/eventutil/events.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/eventutil/events.go b/internal/eventutil/events.go index ca052c31..0f73db2d 100644 --- a/internal/eventutil/events.go +++ b/internal/eventutil/events.go @@ -22,7 +22,6 @@ import ( "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" @@ -51,7 +50,7 @@ func (e ErrRoomNoExists) Unwrap() error { // Returns an error if something else went wrong func QueryAndBuildEvent( ctx context.Context, - proto *gomatrixserverlib.ProtoEvent, cfg *config.Global, + proto *gomatrixserverlib.ProtoEvent, identity *fclient.SigningIdentity, evTime time.Time, rsAPI api.QueryLatestEventsAndStateAPI, queryRes *api.QueryLatestEventsAndStateResponse, ) (*types.HeaderedEvent, error) { @@ -64,14 +63,14 @@ func QueryAndBuildEvent( // This can pass through a ErrRoomNoExists to the caller return nil, err } - return BuildEvent(ctx, proto, cfg, identity, evTime, eventsNeeded, queryRes) + return BuildEvent(ctx, proto, identity, evTime, eventsNeeded, queryRes) } // BuildEvent builds a Matrix event from the builder and QueryLatestEventsAndStateResponse // provided. func BuildEvent( ctx context.Context, - proto *gomatrixserverlib.ProtoEvent, cfg *config.Global, + proto *gomatrixserverlib.ProtoEvent, identity *fclient.SigningIdentity, evTime time.Time, eventsNeeded *gomatrixserverlib.StateNeeded, queryRes *api.QueryLatestEventsAndStateResponse, ) (*types.HeaderedEvent, error) { |