mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 13:44:58 -04:00
Remove backing code for groups/communities (#12558)
Including handlers, configuration code, appservice support, and the GroupID construct.
This commit is contained in:
parent
1cba285a79
commit
49f06866e4
13 changed files with 6 additions and 1894 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue