Created
April 27, 2023 20:02
-
-
Save sendbird-community/81329a5b6fc690c8cd3b339ef4b80c08 to your computer and use it in GitHub Desktop.
checkUserStatus function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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