diff options
author | V <vendicated@riseup.net> | 2023-06-13 02:23:06 +0200 |
---|---|---|
committer | V <vendicated@riseup.net> | 2023-06-13 02:23:06 +0200 |
commit | ab3e9932749d3d5a226cb08906f5c8335d9581c5 (patch) | |
tree | 939f1f17058d094cfbe89250379bf481b6dcfede /src/plugins | |
parent | 386dfe363a484ac0cd492cf6f61a717d90a454ca (diff) | |
download | Vencord-ab3e9932749d3d5a226cb08906f5c8335d9581c5.tar.gz Vencord-ab3e9932749d3d5a226cb08906f5c8335d9581c5.tar.bz2 Vencord-ab3e9932749d3d5a226cb08906f5c8335d9581c5.zip |
ViewRaw: Remove less properties from author
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/viewRaw.tsx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/plugins/viewRaw.tsx b/src/plugins/viewRaw.tsx index eb0c352..9f13db9 100644 --- a/src/plugins/viewRaw.tsx +++ b/src/plugins/viewRaw.tsx @@ -42,22 +42,12 @@ function sortObject<T extends object>(obj: T): T { function cleanMessage(msg: Message) { const clone = sortObject(JSON.parse(JSON.stringify(msg))); - for (const key in clone.author) { - switch (key) { - case "id": - case "username": - case "usernameNormalized": - case "discriminator": - case "avatar": - case "bot": - case "system": - case "publicFlags": - break; - default: - // phone number, email, etc - delete clone.author[key]; - } - } + for (const key of [ + "email", + "phone", + "mfaEnabled", + "personalConnectionId" + ]) delete clone.author[key]; // message logger added properties const cloneAny = clone as any; |