refuseGroupApplication

Introduction

Refuse 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 current group ID.
reason String no All The reason for the refuse.
fromUser String yes All The ID of the applicant.
toUser String yes All The ID of the of the operator.
addTime int no All The time of making this application.
type GroupApplicationTypeEnum no All The application type.
webMessageInstance String no All The instance of the message on Web.

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 refuseGroupApplicationRes = await TencentImSDKPlugin
              .v2TIMManager
              .getGroupManager()
              .refuseGroupApplication(
                groupID: element.groupID, 
                fromUser: element.fromUser!, 
                toUser: element.toUser!, 
                reason: "", 
                addTime: element.addTime!, 
                type: GroupApplicationTypeEnum.values[element.type], 
                webMessageInstance: "", 
              );
          if (refuseGroupApplicationRes.code == 0) {
          }
        }
      });
    }

results matching ""

    No results matching ""