synapse/groups/groups_server.py
def _add_user(self, group_id, user_id, content):
        """Add a user to a group based on a content dict.

        See accept_invite, join_group.
        """
        if not self.hs.is_mine_id(user_id):
            local_attestation = self.attestations.create_attestation(
                group_id, user_id,
            )

            remote_attestation = content["attestation"]

            yield self.attestations.verify_attestation(
                remote_attestation,
                user_id=user_id,
                group_id=group_id,
            )
        else:
            local_attestation = None
            remote_attestation = None

        is_public = _parse_visibility_from_contents(content)

        yield self.store.add_user_to_group(
            group_id, user_id,
            is_admin=False,
            is_public=is_public,
            local_attestation=local_attestation,
            remote_attestation=remote_attestation,
        )

        defer.returnValue(local_attestation)
Add a user to a group based on a content dict.

        See accept_invite, join_group.
        
Add a user to a group based on a content dict.
Add a user to a group based on a content dict .
def _add_user(self, group_id, user_id, content):
        if not self.hs.is_mine_id(user_id):
            local_attestation = self.attestations.create_attestation(
                group_id, user_id,
            )
            remote_attestation = content["attestation"]
            yield self.attestations.verify_attestation(
                remote_attestation,
                user_id=user_id,
                group_id=group_id,
            )
        else:
            local_attestation = None
            remote_attestation = None
        is_public = _parse_visibility_from_contents(content)
        yield self.store.add_user_to_group(
            group_id, user_id,
            is_admin=False,
            is_public=is_public,
            local_attestation=local_attestation,
            remote_attestation=remote_attestation,
        )
        defer.returnValue(local_attestation)
def _add_user ( self , group_id , user_id , content ) : if not self . hs . is_mine_id ( user_id ) : local_attestation = self . attestations . create_attestation ( group_id , user_id , ) remote_attestation = content [ "attestation" ] yield self . attestations . verify_attestation ( remote_attestation , user_id = user_id , group_id = group_id , ) else : local_attestation = None remote_attestation = None is_public = _parse_visibility_from_contents ( content ) yield self . store . add_user_to_group ( group_id , user_id , is_admin = False , is_public = is_public , local_attestation = local_attestation , remote_attestation = remote_attestation , ) defer . returnValue ( local_attestation )
Add a user to a group based on a content dict.
Add a user to a group based on a content dict .
"""Add a user to a group based on a content dict.

        See accept_invite, join_group.
        """
self
group_id
user_id
content