msc4461 delete old records

This commit is contained in:
Josie committed 2026-08-03 18:03:48 +01:00
1 parent b50b10f696
commit afe64da018
1 file changed
+12
+12
View File
@@ -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 [];