Remove backing code for groups/communities (#12558)

Including handlers, configuration code, appservice support, and
the GroupID construct.
This commit is contained in:
Patrick Cloke 2022-05-26 09:04:34 -04:00 committed by GitHub
parent 1cba285a79
commit 49f06866e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 6 additions and 1894 deletions

View file

@ -320,29 +320,6 @@ class EventID(DomainSpecificString):
SIGIL = "$"
@attr.s(slots=True, frozen=True, repr=False)
class GroupID(DomainSpecificString):
"""Structure representing a group ID."""
SIGIL = "+"
@classmethod
def from_string(cls: Type[DS], s: str) -> DS:
group_id: DS = super().from_string(s) # type: ignore
if not group_id.localpart:
raise SynapseError(400, "Group ID cannot be empty", Codes.INVALID_PARAM)
if contains_invalid_mxid_characters(group_id.localpart):
raise SynapseError(
400,
"Group ID can only contain characters a-z, 0-9, or '=_-./'",
Codes.INVALID_PARAM,
)
return group_id
mxid_localpart_allowed_characters = set(
"_-./=" + string.ascii_lowercase + string.digits
)