Add "Purge Remote Media" button

This commit is contained in:
Aine
2024-12-16 11:25:49 +02:00
parent fd4bf7ce5c
commit 9f2293f9c4
12 changed files with 211 additions and 2 deletions

View File

@@ -16,7 +16,11 @@ export const isMXID = (id: string | Identifier): boolean => mxidPattern.test(id
* @returns Whether the user is managed by an application service
*/
export const isASManaged = (id: string | Identifier): boolean => {
return GetConfig().asManagedUsers.some(regex => regex.test(id as string));
const managedUsers = GetConfig().asManagedUsers;
if (!managedUsers) {
return false;
}
return managedUsers.some(regex => regex.test(id as string));
};
/**