Hello,
I’m trying to implement read-only (or preview) mode, which shows messages from a specific group channel which needs access code before/without join. Is there a way to do this?
(I saw this from the community, I’d like to do something similar - Private Channel Preview UI Component - reading Tyler’s comment, it seems there is a way to achieve, but I can’t find any)
I tried this:
const listQuery = groupChannel.createPreviousMessageListQuery(); listQuery.load(100, false, "", (messages, error) => { if (error) { console.error("Load error", error); return; } console.log("Load previous messages", messages); });
but it returns Uncaught (in promise) SendBirdException: Not a member. exception only.
API call returns:
{
message: “Not authorized. “Channel has access code”.”,
code: 400108,
error: true
}
Thanks,
Eueddem