setGroupMemberInfo

Introduction

Set and modify the profile and information of a a specific group member.

This method is works for group owner and group administrators.

nameCardBar and customInfo can be modified.

Parameter details

Parameter name Parameter type Required Description
groupID string yes The group ID.
userID string yes The target user ID.
nameCard string no The nameCard to be set and modified.
groupID StringMap no The custom attributes to be set and modified.

Returned template

V2TimCallback

{
    code : number
    desc : string
}

Return value details

name type description
code number Request result: Error codes. 0 means success.
desc string The description of the error. It will be empty if success.

Code example

import { TencentImSDKPlugin } from 'react-native-tim-js';

const setGroupMemberInfoRes = await TencentImSDKPlugin.v2TIMManager
    .getGroupManager()
    .setGroupMemberInfo(
        'groupID',
        'userID',
        '',
        { custom: 'custom' }
    );
if (setGroupMemberInfoRes.code === 0) {

}

results matching ""

    No results matching ""