mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
msc4461 delete old records
This commit is contained in:
1 parent
b50b10f696
commit
afe64da018
1 file changed
+12
@@ -553,6 +553,18 @@ export async function getAllPerMessageProfiles(
|
||||
typeof mx.getAccountData
|
||||
>[0]
|
||||
);
|
||||
|
||||
// delete old records
|
||||
await mx.deleteAccountData(
|
||||
'fyi.cisnt.permessageprofile.index' as Parameters<typeof mx.getAccountData>[0]
|
||||
);
|
||||
|
||||
profiles.forEach(async (profile) => {
|
||||
if (!profile) return;
|
||||
await mx.deleteAccountData(
|
||||
`fyi.cisnt.permessageprofile.${profile.id}` as Parameters<typeof mx.getAccountData>[0]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if (!profileListIndex) return [];
|
||||
|
||||
Reference in new issue
Block a user