synapse/handlers/groups_local.py
def remove_user_from_group(self, group_id, user_id, requester_user_id, content):
        """Remove a user from a group
        """
        if user_id == requester_user_id:
            token = yield self.store.register_user_group_membership(
                group_id, user_id,
                membership="leave",
            )
            self.notifier.on_new_event(
                "groups_key", token, users=[user_id],
            )

            # TODO: Should probably remember that we tried to leave so that we can
            # retry if the group server is currently down.

        if self.is_mine_id(group_id):
            res = yield self.groups_server_handler.remove_user_from_group(
                group_id, user_id, requester_user_id, content,
            )
        else:
            content["requester_user_id"] = requester_user_id
            res = yield self.transport_client.remove_user_from_group(
                get_domain_from_id(group_id), group_id, requester_user_id,
                user_id, content,
            )

        defer.returnValue(res)
Remove a user from a group
        
Remove a user from a group
Remove a user from a group
def remove_user_from_group(self, group_id, user_id, requester_user_id, content):
        if user_id == requester_user_id:
            token = yield self.store.register_user_group_membership(
                group_id, user_id,
                membership="leave",
            )
            self.notifier.on_new_event(
                "groups_key", token, users=[user_id],
            )
        if self.is_mine_id(group_id):
            res = yield self.groups_server_handler.remove_user_from_group(
                group_id, user_id, requester_user_id, content,
            )
        else:
            content["requester_user_id"] = requester_user_id
            res = yield self.transport_client.remove_user_from_group(
                get_domain_from_id(group_id), group_id, requester_user_id,
                user_id, content,
            )
        defer.returnValue(res)
def remove_user_from_group ( self , group_id , user_id , requester_user_id , content ) : if user_id == requester_user_id : token = yield self . store . register_user_group_membership ( group_id , user_id , membership = "leave" , ) self . notifier . on_new_event ( "groups_key" , token , users = [ user_id ] , ) if self . is_mine_id ( group_id ) : res = yield self . groups_server_handler . remove_user_from_group ( group_id , user_id , requester_user_id , content , ) else : content [ "requester_user_id" ] = requester_user_id res = yield self . transport_client . remove_user_from_group ( get_domain_from_id ( group_id ) , group_id , requester_user_id , user_id , content , ) defer . returnValue ( res )
Remove a user from a group
Remove a user from a group
"""Remove a user from a group
        """ # TODO: Should probably remember that we tried to leave so that we can # retry if the group server is currently down.
self
group_id
user_id
requester_user_id
content