Do I need to specify a separate user with "Admin" privileges?

Hello.

When I join the group channel from the dashboard and enter the “admin” message, the member’s group channel gives the following error.

TypeError: Cannot read properties of undefined (reading ‘userId’)
at r.get (SendBird.min.js:7846:1)
at Dl (Channel.js:230:1)
at Channel.js:3370:1
at Channel.js:3370:67
at Array.map()
at t.value (Channel.js:234:1)
at xs (react-dom.production.min.js:4469:1)
at Ds (react-dom.production.min.js:4460:1)
at Fo (react-dom.production.min.js:6876:1)
at vl (react-dom.production.min.js:6295:1)

Users with “Operator” permission on the dashboard are designated. I’d appreciate it if you could tell me if I need to specify a user with “Admin” privileges separately, and if so, where to specify it.

Hello @2_2,

Admin messages are a different message type and do not have a user ID. The error you provided shows that you are not expecting to receive a message without a user ID.

For example, in my sandbox app I am using something similar to this to render the different messages:

          if (message.messageType === 'file') {
            return (
                <FileMessage message={message} />
            );
          }
          if (message.messageType === 'admin') {
            return (
                <AdminMessage message={message} />
            );
          } else {
            return (
                <UserMessage message={message} />
            );
          }