---
# System prepended metadata

title: Websocket Testing

---

# Websocket Testing 

## Remove group members 

`@jantest2:laledev6.flowring.com` want to remove `@jantest4:laledev6.flowring.com` from room
`"groupId": "+room2021111100000013:laledev6.flowring.com"`
`"roomId":"!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com"`

### Request to remove member
```
{
    "module": "room",
    "method": "remove_group_members",
    "params": {
        "adminId": "@jantest2:laledev6.flowring.com",
        "groupId": "+room2021111100000013:laledev6.flowring.com",
        "roomId": "!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com",
        "userList": [
            "@jantest4:laledev6.flowring.com"
        ],
        "lale_jwt" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJqYW50ZXN0MiIsImV4cCI6MTYzNTkyMjMxMywiaWF0IjoxNjM1OTE5NjEzfQ.SNL2Wt0PQhBiIDbv6hfglUoC0n0rkacCM6I9nYJDM_c"
    }
}
```

### Response for `@jantest2:laledev6.flowring.com`
```
{
   "next_batch":"",
   "device_one_time_keys_count":{
      
   },
   "account_data":{
      
   },
   "to_device":{
      
   },
   "groups":{
      "join":{
         "+room2021111100000013:laledev6.flowring.com":{
            "success":true,
            "message":"\u522a\u9664\u6210\u529f",
            "errorMessage":"",
            "total":0,
            "code":200,
            "stackTrace":"",
            "details":"members are removed from the group"
         }
      },
      "invite":{
         
      },
      "leave":{
         
      }
   },
   "presence":{
      
   },
   "device_lists":{
      
   },
   "rooms":{
      "join":{
         "!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com":{
            "timeline":{
               "events":[
                  {
                     "origin_server_ts":1636611612880,
                     "sender":"@jantest3:laledev6.flowring.com",
                     "event_id":"$16366116125494jAuLx:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366116125493AkOAK:laledev6.flowring.com",
                        "age_ts":1636611612880
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest3"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284640,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16366132845519Hjnxr:laledev6.flowring.com",
                     "unsigned":{
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636613284640
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284718,
                     "sender":"@devtest60:laledev6.flowring.com",
                     "event_id":"$16366132845520tFuPN:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366132845519Hjnxr:laledev6.flowring.com",
                        "age_ts":1636613284718
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636952798587,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16369527989362CWcwY:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366113455489duKzA:laledev6.flowring.com",
                        "age_ts":1636952798587
                     },
                     "content":{
                        "membership":"leave",
                        "reason":""
                     },
                     "type":"m.room.member"
                  }
               ]
            }
         }
      },
      "invite":{
         
      },
      "leave":{
         
      }
   },
   "ws_type":"status",
   "con_id":"69d645cb-a014-4e13-b182-2638c240de1c"
}
```

### Response for `@jantest4:laledev6.flowring.com`
```
{
   "next_batch":"",
   "device_one_time_keys_count":{
      
   },
   "account_data":{
      
   },
   "to_device":{
      
   },
   "groups":{
      "leave":{
         "+room2021111100000013:laledev6.flowring.com":{
            "success":true,
            "message":"\u522a\u9664\u6210\u529f",
            "errorMessage":"",
            "total":0,
            "code":200,
            "stackTrace":"",
            "details":"members are removed from the group"
         }
      },
      "invite":{
         
      },
      "join":{
         
      }
   },
   "presence":{
      
   },
   "device_lists":{
      
   },
   "rooms":{
      "leave":{
         "!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com":{
            "timeline":{
               "events":[
                  {
                     "origin_server_ts":1636611612880,
                     "sender":"@jantest3:laledev6.flowring.com",
                     "event_id":"$16366116125494jAuLx:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366116125493AkOAK:laledev6.flowring.com",
                        "age_ts":1636611612880
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest3"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284640,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16366132845519Hjnxr:laledev6.flowring.com",
                     "unsigned":{
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636613284640
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284718,
                     "sender":"@devtest60:laledev6.flowring.com",
                     "event_id":"$16366132845520tFuPN:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366132845519Hjnxr:laledev6.flowring.com",
                        "age_ts":1636613284718
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636952798587,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16369527989362CWcwY:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366113455489duKzA:laledev6.flowring.com",
                        "age_ts":1636952798587
                     },
                     "content":{
                        "membership":"leave",
                        "reason":""
                     },
                     "type":"m.room.member"
                  }
               ]
            }
         }
      },
      "invite":{
         
      },
      "join":{
         
      }
   },
   "ws_type":"status",
   "con_id":"58b5db28-92ad-40e8-8eba-db726b88cfe6"
}
```




## add group members 

`@jantest2:laledev6.flowring.com` want to remove `@jantest4:laledev6.flowring.com` from room
`"groupId": "+room2021111100000013:laledev6.flowring.com"`
`"roomId":"!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com"`

### Request API 
```
{
    "module": "room",
    "method": "add_group_members",
    "params": {
        "adminId": "@jantest2:laledev6.flowring.com",
        "groupId": "+room2021111100000013:laledev6.flowring.com",
        "roomId": "!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com",
        "userList": [
            "@jantest4:laledev6.flowring.com"
        ],
        "lale_jwt" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJqYW50ZXN0MiIsImV4cCI6MTYzNTkyMjMxMywiaWF0IjoxNjM1OTE5NjEzfQ.SNL2Wt0PQhBiIDbv6hfglUoC0n0rkacCM6I9nYJDM_c"
    }
}
```

### Response for `@jantest2:laledev6.flowring.com`
```
{
   "next_batch":"",
   "device_one_time_keys_count":{
      
   },
   "account_data":{
      
   },
   "to_device":{
      
   },
   "groups":{
      "join":{
         "+room2021111100000013:laledev6.flowring.com":{
            "success":true,
            "message":"\u65b0\u589e\u6210\u529f",
            "errorMessage":"",
            "total":0,
            "code":200,
            "stackTrace":"",
            "details":"new members are added to the group"
         }
      },
      "invite":{
         
      },
      "leave":{
         
      }
   },
   "presence":{
      
   },
   "device_lists":{
      
   },
   "rooms":{
      "join":{
         "!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com":{
            "timeline":{
               "events":[
                  {
                     "origin_server_ts":1636611612880,
                     "sender":"@jantest3:laledev6.flowring.com",
                     "event_id":"$16366116125494jAuLx:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366116125493AkOAK:laledev6.flowring.com",
                        "age_ts":1636611612880
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest3"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636611345093,
                     "sender":"@jantest4:laledev6.flowring.com",
                     "event_id":"$16366113455489duKzA:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366113455488TIeCa:laledev6.flowring.com",
                        "age_ts":1636611345093
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest4"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284640,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16366132845519Hjnxr:laledev6.flowring.com",
                     "unsigned":{
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636613284640
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636953352067,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16369533529419clpDC:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16369527989362CWcwY:laledev6.flowring.com",
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636953352067
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"jantest4"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284718,
                     "sender":"@devtest60:laledev6.flowring.com",
                     "event_id":"$16366132845520tFuPN:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366132845519Hjnxr:laledev6.flowring.com",
                        "age_ts":1636613284718
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636952798587,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16369527989362CWcwY:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366113455489duKzA:laledev6.flowring.com",
                        "age_ts":1636952798587
                     },
                     "content":{
                        "membership":"leave",
                        "reason":""
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636953352646,
                     "sender":"@jantest4:laledev6.flowring.com",
                     "event_id":"$16369533529420PkqAv:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16369533529419clpDC:laledev6.flowring.com",
                        "age_ts":1636953352646
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest4"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636611612775,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16366116125493AkOAK:laledev6.flowring.com",
                     "unsigned":{
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636611612775
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"jantest3"
                     },
                     "type":"m.room.member"
                  }
               ]
            }
         }
      },
      "invite":{
         
      },
      "leave":{
         
      }
   },
   "ws_type":"status",
   "con_id":"69d645cb-a014-4e13-b182-2638c240de1c"
}
```
### Response for `@jantest4:laledev6.flowring.com`
```
{
   "next_batch":"",
   "device_one_time_keys_count":{
      
   },
   "account_data":{
      
   },
   "to_device":{
      
   },
   "groups":{
      "join":{
         "+room2021111100000013:laledev6.flowring.com":{
            "success":true,
            "message":"\u65b0\u589e\u6210\u529f",
            "errorMessage":"",
            "total":0,
            "code":200,
            "stackTrace":"",
            "details":"new members are added to the group"
         }
      },
      "invite":{
         
      },
      "leave":{
         
      }
   },
   "presence":{
      
   },
   "device_lists":{
      
   },
   "rooms":{
      "join":{
         "!GDqMjEDHbAPQjlUcGu:laledev6.flowring.com":{
            "timeline":{
               "events":[
                  {
                     "origin_server_ts":1636611612880,
                     "sender":"@jantest3:laledev6.flowring.com",
                     "event_id":"$16366116125494jAuLx:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366116125493AkOAK:laledev6.flowring.com",
                        "age_ts":1636611612880
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest3"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636611345093,
                     "sender":"@jantest4:laledev6.flowring.com",
                     "event_id":"$16366113455489duKzA:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366113455488TIeCa:laledev6.flowring.com",
                        "age_ts":1636611345093
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest4"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284640,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16366132845519Hjnxr:laledev6.flowring.com",
                     "unsigned":{
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636613284640
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636953352067,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16369533529419clpDC:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16369527989362CWcwY:laledev6.flowring.com",
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636953352067
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"jantest4"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636613284718,
                     "sender":"@devtest60:laledev6.flowring.com",
                     "event_id":"$16366132845520tFuPN:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366132845519Hjnxr:laledev6.flowring.com",
                        "age_ts":1636613284718
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"devtest60"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636952798587,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16369527989362CWcwY:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16366113455489duKzA:laledev6.flowring.com",
                        "age_ts":1636952798587
                     },
                     "content":{
                        "membership":"leave",
                        "reason":""
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636953352646,
                     "sender":"@jantest4:laledev6.flowring.com",
                     "event_id":"$16369533529420PkqAv:laledev6.flowring.com",
                     "unsigned":{
                        "replaces_state":"$16369533529419clpDC:laledev6.flowring.com",
                        "age_ts":1636953352646
                     },
                     "content":{
                        "membership":"join",
                        "avatar_url":null,
                        "displayname":"jantest4"
                     },
                     "type":"m.room.member"
                  },
                  {
                     "origin_server_ts":1636611612775,
                     "sender":"@jantest2:laledev6.flowring.com",
                     "event_id":"$16366116125493AkOAK:laledev6.flowring.com",
                     "unsigned":{
                        "invite_room_state":[
                           {
                              "content":{
                                 "name":"test add members 2"
                              },
                              "type":"m.room.name",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "join_rule":"public"
                              },
                              "type":"m.room.join_rules",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":""
                           },
                           {
                              "content":{
                                 "membership":"join",
                                 "avatar_url":null,
                                 "displayname":"jantest2"
                              },
                              "type":"m.room.member",
                              "sender":"@jantest2:laledev6.flowring.com",
                              "state_key":"@jantest2:laledev6.flowring.com"
                           }
                        ],
                        "age_ts":1636611612775
                     },
                     "content":{
                        "membership":"invite",
                        "avatar_url":null,
                        "displayname":"jantest3"
                     },
                     "type":"m.room.member"
                  }
               ]
            }
         }
      },
      "invite":{
         
      },
      "leave":{
         
      }
   },
   "ws_type":"status",
   "con_id":"58b5db28-92ad-40e8-8eba-db726b88cfe6"
}
```