mirror of
https://github.com/element-hq/synapse.git
synced 2026-06-06 19:52:07 +00:00
Remove code that accidentally came here from https://github.com/element-hq/synapse/pull/19542/changes#r2913827732 and was then removed in https://github.com/element-hq/synapse/pull/19398
This commit is contained in:
@@ -465,27 +465,6 @@ class ProfileHandler:
|
||||
|
||||
profile_updates: list[tuple[str, JsonValue | None]] = []
|
||||
current_profile: ProfileInfo | None = None
|
||||
if not by_admin:
|
||||
current_profile = await self.store.get_profileinfo(target_user)
|
||||
if not self.hs.config.registration.enable_set_displayname:
|
||||
if current_profile.display_name:
|
||||
# SUSPICIOUS: It seems strange to block deactivation on this,
|
||||
# though this is preserving previous behaviour.
|
||||
raise SynapseError(
|
||||
400,
|
||||
"Changing display name is disabled on this server",
|
||||
Codes.FORBIDDEN,
|
||||
)
|
||||
|
||||
if not self.hs.config.registration.enable_set_avatar_url:
|
||||
if current_profile.avatar_url:
|
||||
# SUSPICIOUS: It seems strange to block deactivation on this,
|
||||
# though this is preserving previous behaviour.
|
||||
raise SynapseError(
|
||||
400,
|
||||
"Changing avatar is disabled on this server",
|
||||
Codes.FORBIDDEN,
|
||||
)
|
||||
|
||||
if self._msc4429_enabled:
|
||||
if current_profile is None:
|
||||
|
||||
Reference in New Issue
Block a user