How to get "Exit or Enter User time or log" in Group Channel object

I want to know time who exit or enter group channel.
i konw eventHandler, but i want to get log like groupChannel.getMessage()

anyone know way to get exit or enter log in group channel in js sdk?

Hello @seolim

You can use the onUserEntered and onUserExited event handlers to get logs of users entering or exiting a group channel in the JavaScript SDK. These event handlers are triggered when a user enters or exits a group channel.

You can then use the groupChannel.getMessagesByTimestamp method to retrieve the log of these events.

Thank for fast kind reply.

I coding with your advice, but unfortunately groupChannel.getMessagesByTimestamp only get UserMessageList.

i checked onUserExited work correct when user leave. but getMessagesByTimestamp only get UserMessageList, no event log.

it need any condition or params? i used it below.

channel.getMessagesByTimestamp(Date.now(), {
            replyType: ReplyType.ALL,
            reverse: true,
            includeThreadInfo: true,
            includeReactions: true,
            includeParentMessageInfo: true,
            prevResultSize: 20,
            nextResultSize: 0,
})

Additional

I found auto generate message in setting & PlatformAPI.
Thank you for kindness