Skip to content

MSC3911 AP4: Update methods for profile updates to support attaching media - #94

Closed
itsoyou wants to merge 19 commits into
msc3911from
syk/msc3911-ap4-profile-updates
Closed

itsoyou wants to merge 19 commits into
msc3911from
syk/msc3911-ap4-profile-updates

Conversation

@itsoyou

@itsoyou itsoyou commented Aug 27, 2025

Copy link
Copy Markdown
Member

Linked Media MSC3911 AP4: Update methods for profile updates to support attaching media #3354

For linking media we not only have events, but also profiles, that can be queried over federation independently of events. These should also allow attaching media.

Acceptance criteria

Open Questions

(from the ticket) We need to ensure synapse returns the right avatar over federation, otherwise this restriction is impossible to apply. That might require some digging?

@itsoyou
itsoyou changed the base branch from master to msc3911 August 27, 2025 13:09
@itsoyou
itsoyou changed the base branch from msc3911 to jason/msc3911-ap3-sending-events August 27, 2025 13:09
…pass it throughout for persisting per event instead of after the batch
@itsoyou
itsoyou marked this pull request as ready for review August 27, 2025 21:37
@itsoyou
itsoyou requested a review from a team as a code owner August 27, 2025 21:37
@itsoyou
itsoyou marked this pull request as draft August 28, 2025 09:57
@itsoyou
itsoyou force-pushed the syk/msc3911-ap4-profile-updates branch from 13d8b8b to 2dc1aa2 Compare August 28, 2025 10:03
@itsoyou
itsoyou marked this pull request as ready for review August 28, 2025 10:04
@jason-famedly
jason-famedly force-pushed the jason/msc3911-ap3-sending-events branch from cd18754 to a80fe44 Compare August 28, 2025 13:52
…' and use it for 'get_local_media_info_for_request()'"

This reverts commit 2675f63.
… to better illustrate that it could be responding to a request directly"

This reverts commit d8b04a5.
@nico-famedly

Copy link
Copy Markdown
Member

You probably want to change the target branch later, but for now this makes the review easier. :)

Comment thread synapse/rest/client/profile.py Outdated
Comment thread synapse/rest/client/profile.py Outdated
Comment thread synapse/rest/client/profile.py Outdated
@itsoyou
itsoyou requested a review from nico-famedly August 29, 2025 08:24
Comment thread synapse/rest/client/profile.py Outdated
SynapseError: If any of the media is inappropriate or if the requester was not
allowed to attach the media
"""
if not avatar_url or avatar_url == "":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A user is allowed to remove their avatar by setting the avatar url to "" or null.

Comment thread synapse/rest/client/profile.py Outdated
)

# Update the media restrictions to include the profile user ID
await self.hs.get_datastores().main.set_media_restrictions(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should be done in the profile_handler?

Comment thread synapse/rest/client/profile.py
@itsoyou
itsoyou requested a review from nico-famedly August 29, 2025 12:20
@itsoyou
itsoyou force-pushed the syk/msc3911-ap4-profile-updates branch from 70c3520 to 59e78cd Compare September 1, 2025 09:13
@jason-famedly
jason-famedly force-pushed the jason/msc3911-ap3-sending-events branch 5 times, most recently from 6d8d0e8 to 5529009 Compare September 3, 2025 11:06
Base automatically changed from jason/msc3911-ap3-sending-events to msc3911 September 3, 2025 12:03
@nico-famedly

Copy link
Copy Markdown
Member

@itsoyou , can you update this PR to resolve the merge conflicts and change the target branch? :)

@itsoyou

itsoyou commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

I am closing this since I created #97 with cherry-pick. too much work for rebase

@itsoyou itsoyou closed this Sep 3, 2025
@itsoyou
itsoyou deleted the syk/msc3911-ap4-profile-updates branch March 9, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants