Device manager - use deleteAccountData to prune device manager client information events (#9734)
This commit is contained in:
@@ -75,9 +75,9 @@ export const removeClientInformation = async (matrixClient: MatrixClient): Promi
|
||||
const type = getClientInformationEventType(deviceId);
|
||||
const clientInformation = getDeviceClientInformation(matrixClient, deviceId);
|
||||
|
||||
// if a non-empty client info event exists, overwrite to remove the content
|
||||
// if a non-empty client info event exists, remove it
|
||||
if (clientInformation.name || clientInformation.version || clientInformation.url) {
|
||||
await matrixClient.setAccountData(type, {});
|
||||
await matrixClient.deleteAccountData(type);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user