onMemberAddedToGroup method

  1. @override
void onMemberAddedToGroup(
  1. Action action,
  2. User addedby,
  3. User userAdded,
  4. Group addedTo,
)
override

Implementation

@override
onMemberAddedToGroup(
    kit.Action action, User addedby, User userAdded, Group addedTo) {
  int matchedIndex;
  matchedIndex = getMatchingIndex(addedTo);
  if (matchedIndex == -1) {
    //TODO: once hasJoined has been fixed in sdk the following override will be removed
    addedTo.hasJoined = true;
    addElement(addedTo);
  } else {
    updateElement(addedTo);
  }
}