Device manager - use deleteAccountData to prune device manager client information events (#9734)
This commit is contained in:
parent
85d43fffc4
commit
aeb9f4373f
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue