Rename account data field to in.cinny.explore

This commit is contained in:
Ginger 2025-03-18 10:31:23 -04:00
parent 96746d8976
commit 919be5b846
2 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@ export const useExploreServers = (): [
(server: string) => Promise<void>
] => {
const mx = useMatrixClient();
const accountData = useAccountData(AccountDataEvent.CinnyExploreServers);
const accountData = useAccountData(AccountDataEvent.CinnyExplore);
const userAddedServers = useMemo(
() => accountData?.getContent<InCinnyExploreServersContent>()?.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),
});
},

View file

@ -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',