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
SendBirdCall.addListener('LISTENER_ID', { | |
onInvitationReceived: (invitation) => { | |
// Accept an invitation. | |
invitation.accept(); | |
// Decline an invitation. | |
invitation.decline(); | |
} | |
}); |
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
SendBirdCall.addListener('LISTENER_ID', { | |
onInvitationReceived: (invitation) => { | |
// Received an invitation from `invitation.inviter`. | |
} | |
}); |
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
try { | |
const invitation = await globalRoom.sendInvitation(inviteeId); | |
// Invitation has been successfully sent to the invitee. | |
} catch (e) { | |
// error happened. | |
} |
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
try { | |
await room.enter({ audioEnabled: true, videoEnabled: true }); | |
} catch (e) { | |
// error happened. | |
} |
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
try { | |
const room = await SendBirdCall.createRoom({ | |
roomType: 'small_room_for_video', | |
}); | |
} catch (e) { | |
// error happened. | |
} |
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
export default function UserStatus({ | |
setShowUserStatus, | |
selectedUser, | |
userStatus, | |
}) { | |
return ( | |
<div className="bg-modal" style={{ display: "flex" }}> | |
<div className="modal-content users-list"> | |
<div | |
className="users_list_close_btn" |
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); |
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
return ( | |
<div className="bg-modal" style={{ display: "flex" }}> | |
<div className="modal-content users_list"> | |
<div | |
className="users_list_close_btn" | |
onClick={() => setShowUsersList(false)} | |
> | |
+ | |
</div> | |
<h3 id="users_list_title"> |
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
function showList() { | |
setShowUsersList(true); | |
let members = channel.members.filter((member) => { | |
return member.userId !== userId; | |
}); | |
setUsers(members); | |
} |
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
return ( | |
<div> | |
<div className="sendbird-channel-settings_user-list" onClick={showList}> | |
<div | |
className="sendbird-channel-settings__panel-icon-left sendbird-channel-settings__panel-user-list sendbird-icon sendbird-icon-user-list sendbird-icon-color--error" | |
role="button" | |
tabIndex="0" | |
> | |
<IconButton | |
sx={{ color: "#7B53EF" }} |