React SDK does not show new group channels

I wanted to forward here some of the messages I’m exchanging with @Tyler in case it’s helpful for other Sendbird team members.

This is our snippet to send the ADMM message

const apiSendMessage = async (
  channelId: string,
  userId: string,
  messageBody: string,
  messageType: string,
): Promise<void> => {
  const payload = {
    message_type: messageType,
    user_id: userId,
    message: messageBody,
    is_silent: messageType === "ADMM" ? true : false,
  };

  const headers: Headers = new Headers();
  headers.set("Api-Token", process.env.SENDBIRD_API_TOKEN ?? "");

  const response = await fetch(`${apiUrl}/group_channels/${channelId}/messages`, {
    method: "post",
    headers,
    body: JSON.stringify(payload),
  });
  const { error, message } = await response.json();

  if (error) {
    throw new Error(`Sendbird error: ${message}`);
  }

  return;
};

Which we always call in the case of the channel’s first message as:

  const messageBody =
    "Messages are end-to-end encrypted. No one outside of this chat can read them";
  return apiSendMessage(channelUrl, "", messageBody, "ADMM")

My question stemming from the snippet and potentially helpful for you to debug this is:
Can the is_silent param have an impact on last_message GET /channels/channel-id response field? It’s still an ADMM type of message but could be helpful for debugging.

Moving our conversation back to public view,

The is_silent is most definitely the cause of this. Here is a snippet from our docs about is_silent :

Determines whether to send a message without updating some of the channel properties. If a message is sent in a channel, with this property set to true , the channel’s last_message is updated only for the sender while its unread_message_count remains unchanged for all channel members. Also, the message doesn’t send a push notification to message receivers. If the message is sent to a hidden channel, the channel still remains hidden. (Default: false )

You can see that when you pass is_silent as true, the last_message is not updated for anyone but the sender. As most ADMM messages do not have a sender, its not updated for most people.

Was is_silent recently added , around the time you started seeing these issues?

Yes we added the is_silent suspiciously close to the same time these issues started appearing.

In that case, is this statement from Walter not correct?

Admin messages will not count. For Sendbird, a channel with admin messages will be empty.

That is, ADMM messages will indeed count like any other message, it was the is_silent that made it not count and require a includeEmpty: true param.

If that’s the case, a follow-up question is then: how can we send an ADMIN message in a way that the user does not get a notification while the conversation appears at the UI, when using the App React UIkit component you provide? Which does not allow to specify includeEmpty param.

ADMM messages do count in a channel unless the message is marked is_silent which prevents it from being counted for unread_message_count, latest_message and the like.

In terms of your follow up question, the only way to not get a notification is passing send_push as false (Which is the default). This prevents them from getting a push notification but unread_count would still be updated.

Edit: To clarify a bit further. Walter was actually referencing the automated ADMM messages that can be enabled in the Dashboard. These messages that are automatically sent on channel creation and the like are sent as is_silent is a true, and do NOT show up as the latest message or impact the unread count.