From 365ce809f6a23a2e2210bde5fec2ea9a148bf542 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 22 Jan 2020 17:52:13 +0530 Subject: [PATCH] Add canonical alias functions to storage --- roomserver/storage/storage.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roomserver/storage/storage.go b/roomserver/storage/storage.go index df08c124b..f2c62fc6c 100644 --- a/roomserver/storage/storage.go +++ b/roomserver/storage/storage.go @@ -49,6 +49,11 @@ type Database interface { GetAliasesForRoomID(ctx context.Context, roomID string) ([]string, error) GetCreatorIDForAlias(ctx context.Context, alias string) (string, error) RemoveRoomAlias(ctx context.Context, alias string) error + SetRoomCanonicalAlias(ctx context.Context, canonical_alias string, roomID string, creatorUserID string) error + GetRoomIDForCanonicalAlias(ctx context.Context, canonical_alias string) (string, error) + GetCanonicalAliasForRoomID(ctx context.Context, roomID string) (string, error) + GetCreatorIDForCanonicalAlias(ctx context.Context, canonical_alias string) (string, error) + RemoveRoomCanonicalAlias(ctx context.Context, canonical_alias string) error StateEntriesForTuples(ctx context.Context, stateBlockNIDs []types.StateBlockNID, stateKeyTuples []types.StateKeyTuple) ([]types.StateEntryList, error) MembershipUpdater(ctx context.Context, roomID, targetUserID string) (types.MembershipUpdater, error) GetMembership(ctx context.Context, roomNID types.RoomNID, requestSenderUserID string) (membershipEventNID types.EventNID, stillInRoom bool, err error)