Storing collections with a null user_id using Javascript

Hello,

I have Nakama process in Javascript that writes data to storage that is intended to be viewed by all users in a match. The instruction looks like this after the user has logged into the nakama server, has been authenticated, and has joined a match:

const initialItems = await nakamaClientInstance.writeStorageObjects(session, [

            {

                "collection": "items",

                "key": "<uuid 1>",

                "value": <stuff>

            },

            ....

        ]);

        console.info("Successfully stored objects: ", initialItems);

However, printing the result shows that the user_id field is occupied with the user_id generated by the auth routine. My intention is to have that field null so that the data I’m pushing is accessible to all Users in a match. There doesn’t seem to be a straightforward way of doing this (unlike GDScript) so I’d like to know how to do this using the current Nakama Client Javascript library. Setting an explicit user_id value to null or a blank string doesn’t solve the problem.

I figured it out. I didn’t set the read/write permissions correctly.