Created
October 11, 2021 03:37
-
-
Save hieptl/8f0eb3401b6a12f8bef56fe3a88eb616 to your computer and use it in GitHub Desktop.
AddGroupMembers.js - Call CometChat Service to Add Members - React Native Gifted Chat App
This file contains hidden or 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
... | |
const GUID = selectedConversation.guid; | |
const membersList = [ | |
new cometChat.GroupMember(selectedUser.uid, cometChat.GROUP_MEMBER_SCOPE.PARTICIPANT), | |
]; | |
cometChat.addMembersToGroup(GUID, membersList, []).then( | |
response => { | |
setIsLoading(false); | |
showMessage('Info', `${selectedUser.name} was added to the group successfully`); | |
searchUsers(); | |
}, | |
error => { | |
} | |
); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment