作者: Wenwei Yang

Group: Process Merge Request

处理其他群组发过来的合并群组请求

  1. 前端必须要先获取合并群组请求的ID, “message_type”为1200的消息是合并群组请求消息,可在该数据中的detail字段获取合并群组请求的ID。
  2. 以下是群组合并请求的消息范例, 从”detail” 字段中可获取”request_id”字段,即合并群组请求ID。
  3. 调用processMergeRequest API时,将 “request_id” 值放入请求信息体的”request_id”字段中。
{
    "data": [
        {
            "id": 22608, 
            "from_user": null, 
            "from_name": null, 
            "to_user": 9716362343737, 
            "to_name": "潘 丽达", 
            "to_group": 6999, 
            "content": null, 
            "message_type": 1200, // It is a group merge request message
            "send_time": "2020-06-12T02:49:56.987800Z", 
            "location": null, 
            "timezone": null, 
            "detail": {
                "is_handled": false, 
                "request_id": 4, 
                "source_group": 7011, 
                "target_group": 6999, 
                "source_group_name": "请求合并的群", 
                "target_group_name": "潘 丽达的群", 
                "source_group_creator_uid": 7815769374283, 
                "target_group_creator_uid": 9716362343737, 
                "source_group_creator_name": "WenWei Yang", 
                "target_group_creator_name": "潘 丽达"
            }
        }
    ]
}

Request

HTTP request

POST https://www.featapi.com/api/party/group/{id}/process_merge_request/

继续阅读

Group: Post Merge Request

当前用户指定拥有的一个群组向另一个群组发起合并群组请求。只有群主可以执行该操作。如果目标群组的群主和当前用户为同一人,自动完成合并操作。如果不是,该合并请求被发送到目标群组的群主,并且等待他的处理。如果对方同意,原群组会解散(不可恢复),然后目标群组会合并原群组的成员。

Request

HTTP request

POST https://www.featapi.com/api/party/group/{id}/merge_request/

继续阅读

Group: Remove Member

移除一名群组的成员。只有群主可以执行该操作,也只有群主收到该名成员被移除的消息。如果群主想要将已移除的成员恢复到群组,执行Party.Group.addMember API 来实现。

注意:移除群成员后导致群组有效成员少于3人,在24小时内,若该群组依然少于3人则触发系统强制解散操作,并且群主不可恢复该群组。

Request

HTTP request

POST https://www.featapi.com/api/party/group/{id}/remove_member/

Parameters

Path parameters

Parameter nameValueDescription
idstring群组 ID

Authorization

该请求需要授权以下scopes访问权限:

Scopes
party_group

For more information, see the authentication and authorization page.

Request body

In the request body, supply a Party.Contact resource with the following properties:

Property nameValueDescriptionNotes
必填
uidstring群组成员的用户ID,指定群组一名将要移除的成员。 范例:{“uid”: “5315959601855”}

Response

如果请求成功,返回被移除的群成员数据在响应体信息,并且该成员的“is_removed”字段为true。

200 Remove member from group successfully.

{
    "id": 7786,
    "user": 5315959601855,
    "fullname": "Garfield MJ",
    "first_name": "Garfield",
    "last_name": "MJ",
    "status": 300,
    "contact_time": "2020-06-10T10:33:25.496694Z",
    "expertise": "游泳",
    "timezone": "Asia/Shanghai",
    "timezone_utc_offset": "+08:00",
    "location": "CHN",
    "avatar": "/media/5315959601855/avatar/blob",
    "is_removed": true
}

404 Not found

示例返回数据可参考 API Common – Resource Not Found