setSelfInfo

Introduction

Set and modify the self info and profile.

V2TimUserFullInfo callback will be triggered after modifying success.

Parameter details

Parameter name Parameter type Required Description
userFullInfo V2TimUserFullInfo yes The user info to set.

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 setSelfInfoRes = await TencentImSDKPlugin.v2TIMManager.setSelfInfo({
    nickName: '',
    allowType: 0,
    birthday: 0,
    customInfo: { custom: 'custom' },
    faceUrl: '',
    gender: 1,
    level: 0,
    role: 0,
    selfSignature: '',
    userID: '',
});
if (setSelfInfoRes.code === 0) {

}

results matching ""

    No results matching ""