acceptGroupApplication

Introduction

Accept a group entry application.

webMessageInstance is needed when using in web, which is the message instance of group tips application.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The group ID.
reason String no All The reason for the accepting.
fromUser String yes All The User ID of the applicant.
toUser String yes All The User ID of the examiner.
addTime int no All The application time.
type GroupApplicationTypeEnum no All The application type.
webMessageInstance String no All The message instance from Web Message.

Returned template

V2TimCallback

{
    code : int
    desc : String
}

Return value details

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

Code example

    V2TimValueCallback<V2TimGroupApplicationResult> getGroupApplicationListRes =
        await TencentImSDKPlugin.v2TIMManager
            .getGroupManager()
            .getGroupApplicationList();
    if (getGroupApplicationListRes.code == 0) {
      getGroupApplicationListRes.data?.groupApplicationList
          ?.forEach((element) async {
        if (element != null) {
          V2TimCallback acceptGroupApplicationRes = await TencentImSDKPlugin
              .v2TIMManager
              .getGroupManager()
              .acceptGroupApplication(
                groupID: element.groupID, 
                fromUser: element.fromUser!, 
                toUser: element.toUser!, 
                reason: "", 
                addTime: element.addTime, 
                type: GroupApplicationTypeEnum.values[element.type], 
                webMessageInstance: "", 
              );
          if (acceptGroupApplicationRes.code == 0) {
          }
        }
      });
    }

results matching ""

    No results matching ""