Retrieve Group Data

Get Group Members#

To fetch all the groups members of a group call the below method.

Mirrorfly.getGroupMembersList(jid: GROUP_JID,fetchFromServer: GET_SERVER_DATA, flyCallBack: (FlyResponse response) {
if(response.isSuccess && response.hasData){
var groupsMembersProfileList = profileFromJson(;
// Update the UI
// Fetching group members list failed print throwable to find the exception details.

Fetching group members from a server will be called internally when required. So , unless it was necessary set false for getServerData.

GET_SERVER_DATAboolif true fetches data from the server else fetches data from local database
GROUP_JIDStringJid of the group
flyCallbackFlyResponsecallback to observe the action status

Check User is a member#

To check whether a user of a given jid is a member of the group

bool? isMember = await Mirrorfly.isMemberOfGroup(groupJid:GROUP_ID,userJid: USER_JID);
GROUP_IDStringJid of the group
USER_JIDStringJid of the user

Check group admin#

User can able to check some participant of the group is a admin or not to the group. The below method can be used to check someone admin or not.The below method will return true if userJid is admin for the provided groupJid.

bool? isAdmin = await Mirrorfly.isGroupAdmin(groupJid:GROUP_ID,userJid: USER_JID);
GROUP_JIDStringJid of the group
USER_JIDStringJid of the group participant