Skip to content

Instantly share code, notes, and snippets.

@sendbird-community
Created April 27, 2023 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sendbird-community/81329a5b6fc690c8cd3b339ef4b80c08 to your computer and use it in GitHub Desktop.
Save sendbird-community/81329a5b6fc690c8cd3b339ef4b80c08 to your computer and use it in GitHub Desktop.
checkUserStatus function
async function checkUserStatus(e) {
e.preventDefault();
const queryParams = {
userIdsFilter: [selectedUser.userId],
};
const query = sb.createApplicationUserListQuery(queryParams);
const userInfo = await query.next();
setUserStatus(userInfo[0].connectionStatus);
setShowUserStatus(true);
setShowUsersList(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment