refuseGroupApplication method

Future<V2TimCallback> refuseGroupApplication({
  1. required String groupID,
  2. String? reason,
  3. required String fromUser,
  4. required String toUser,
  5. required int addTime,
  6. required GroupApplicationTypeEnum type,
  7. V2TimGroupApplication? application,
  8. String? webMessageInstance,
})

拒绝某一条加群申请

参数:

application 群申请,传入从接口 getGroupApplicationList 获取的群申请对象,8.5.6864+4 版本及以上建议传入该字段。

webMessageInstance web端实例

type 群未决请求类型 GroupApplicationTypeEnum

fromUser 请求者ID

toUser 获取处理者 ID, 请求加群:0,邀请加群:被邀请人

addTime 获取群未决添加的时间

web 端使用时必须传入webMessageInstance 字段。 对应【群系统通知】的消息实例

Implementation

Future<V2TimCallback> refuseGroupApplication({
  required String groupID,
  String? reason,
  required String fromUser,
  required String toUser,
  required int addTime,
  required GroupApplicationTypeEnum type,
  V2TimGroupApplication? application,
  String? webMessageInstance,
}) async {
  if (kIsWeb) {
    return TencentCloudChatSdkPlatform.instance.refuseGroupApplication(
        groupID: groupID,
        fromUser: fromUser,
        toUser: toUser,
        addTime: addTime,
        type: type.index,
        webMessageInstance: webMessageInstance);
  }
  return TIMGroupManager.instance.refuseGroupApplication(
    groupID: groupID,
    fromUser: fromUser,
    toUser: toUser,
    addTime: addTime,
    type: type,
    application: application,
  );
}