isAdmin static method
Checks if a user is an admin of a group.
This method checks whether the specified user is an admin of the specified group.
Note that this method is deprecated and it is recommended to use
Mirrorfly.isGroupAdmin()
instead.
Params:
userJid
: The JID of the user to check.groupJID
: The JID of the group.
Returns:
- A
Future<bool?>
that completes withtrue
if the user is an admin,false
otherwise.
Usage example:
Mirrorfly.isAdmin(userJid, groupJID).then((isAdmin) {
// Handle the result
if (isAdmin == true) {
print("User is an admin of the group");
} else {
print("User is not an admin of the group");
}
});
Implementation
@Deprecated('Instead of use Mirrorfly.isGroupAdmin()')
static Future<bool?> isAdmin(String userJid, String groupJID) {
return FlyChatFlutterPlatform.instance.isAdmin(userJid, groupJID);
}