HomePhabricator
Diffusion Comm 6949cb2ecf00

[keyserver] Replace undefined subthread_permissions with null

Description

[keyserver] Replace undefined subthread_permissions with null

Summary:
When fetching a message for entry action, we weren't selecting subthread_permissions. Then the result was passed to rawMessageInfoFromRows which uses JSON.parse on subthread_permissions. When a value is null, parsing returns null. But when a value is undefined, parsing throws an error.

Modified the code so that we're fetching NULL - all the entry messages are different from messageTypes.CREATE_SUB_THREAD so they don't have subthread_permissions.

https://linear.app/comm/issue/ENG-5684/editing-entries-doesnt-work

Test Plan: Create and edit an entry in the community root - it should work.

Reviewers: ashoat, atul, kamil, inka

Reviewed By: inka

Subscribers: wyilio

Differential Revision: https://phab.comm.dev/D9765

Details

Provenance
tomekAuthored on Nov 9 2023, 1:19 AM
Reviewer
inka
Differential Revision
D9765: [keyserver] Replace undefined subthread_permissions with null
Parents
rCOMM16501e45b860: [lib][web][native] Refactor cookieSelector
Branches
Unknown
Tags
Unknown