feat(pad-settings): added possibility to delete pad by the creator (#6730)

This commit is contained in:
SamTV12345 2024-10-28 21:56:10 +01:00 committed by GitHub
parent ac4489875f
commit 1e3a61e5fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 84 additions and 15 deletions

View file

@ -250,6 +250,19 @@ export const sendUserChanges = async (socket:any, data:any) => await sendMessage
},
});
/*
* Convenience function to send a delete pad request.
*/
export const sendPadDelete = async (socket:any, data:any) => await sendMessage(socket, {
type: 'PAD_DELETE',
component: 'pad',
data: {
padId: data.padId
},
});
/**
* Convenience function that waits for an ACCEPT_COMMIT message. Asserts that the new revision
* matches the expected revision.