setMemberAttributes method
Set group member custom attributes.
Param groupId Group ID
Param attributes Custom attributes map (key-value)
Param userId Target user ID to set attributes
Returns None.
Throws Exception description, see ChatError.
Implementation
Future<void> setMemberAttributes({
required String groupId,
required Map<String, String> attributes,
String? userId,
}) async {
try {
Map req = {
'groupId': groupId,
};
req.putIfNotNull('userId', userId);
req.putIfNotNull('attributes', attributes);
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.setMemberAttributesFromGroup, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}