diff --git a/src/app/hooks/useExploreServers.ts b/src/app/hooks/useExploreServers.ts index fd9ce757..cc27baec 100644 --- a/src/app/hooks/useExploreServers.ts +++ b/src/app/hooks/useExploreServers.ts @@ -13,7 +13,7 @@ export const useExploreServers = (): [ (server: string) => Promise ] => { const mx = useMatrixClient(); - const accountData = useAccountData(AccountDataEvent.CinnyExploreServers); + const accountData = useAccountData(AccountDataEvent.CinnyExplore); const userAddedServers = useMemo( () => accountData?.getContent()?.servers ?? [], [accountData] @@ -22,7 +22,7 @@ export const useExploreServers = (): [ const addServer = useCallback( async (server: string) => { if (userAddedServers.indexOf(server) === -1) { - await mx.setAccountData(AccountDataEvent.CinnyExploreServers, { + await mx.setAccountData(AccountDataEvent.CinnyExplore, { servers: [...userAddedServers, server], }); } @@ -32,7 +32,7 @@ export const useExploreServers = (): [ const removeServer = useCallback( async (server: string) => { - await mx.setAccountData(AccountDataEvent.CinnyExploreServers, { + await mx.setAccountData(AccountDataEvent.CinnyExplore, { servers: userAddedServers.filter((addedServer) => server !== addedServer), }); }, diff --git a/src/types/matrix/accountData.ts b/src/types/matrix/accountData.ts index ba5a07f4..1c6eee89 100644 --- a/src/types/matrix/accountData.ts +++ b/src/types/matrix/accountData.ts @@ -4,7 +4,7 @@ export enum AccountDataEvent { IgnoredUserList = 'm.ignored_user_list', CinnySpaces = 'in.cinny.spaces', - CinnyExploreServers = 'in.cinny.explore_servers', + CinnyExplore = 'in.cinny.explore', ElementRecentEmoji = 'io.element.recent_emoji',