Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement MSC4133 to support custom profile fields. #17488

Merged
merged 48 commits into from
Jan 21, 2025

Conversation

clokep
Copy link
Contributor

@clokep clokep commented Jul 25, 2024

Implementation of MSC4133 to support custom profile fields. It is behind an experimental flag and includes tests.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@clokep clokep marked this pull request as ready for review July 26, 2024 00:00
@clokep clokep requested a review from a team as a code owner July 26, 2024 00:00
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

A few comments, but this is definitely on the right track. Thanks for implementing this!

clokep and others added 4 commits July 31, 2024 07:25
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
@clokep
Copy link
Contributor Author

clokep commented Aug 9, 2024

I pushed some changes to update / flesh out the rest of the MSC, but I haven't yet gone through @anoadragon453's comments so not worth another review yet. (If folks want to test it that would be reasonable...I'm sure it'll break.)

@clokep clokep changed the title Partially implement MSC4133 to support custom profile fields. Implement MSC4133 to support custom profile fields. Sep 9, 2024
@wcjord

This comment was marked as off-topic.

@clokep
Copy link
Contributor Author

clokep commented Dec 31, 2024

We're very excited to have this feature! What are the next steps?

anoadragon453 pushed a commit that referenced this pull request Jan 3, 2025
Refactor `get_profile` to avoid returning "empty" (`None` / `null`)
fields. Currently this is not very important, but will be more useful
once #17488 lands. It does update the servlet to use this now which has
a minor change in behavior: additional fields served over federation
will now be properly sent back to clients.

It also adds constants for `avatar_url` / `displayname` although I did
not attempt to use it everywhere possible.
@clokep clokep requested a review from anoadragon453 January 3, 2025 19:13
@clokep
Copy link
Contributor Author

clokep commented Jan 3, 2025

@anoadragon453 This should be ready for another review. The commits definitely became very messy so unfortunately probably needs to be reviewed as a single change.

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

This looks great, thank you! ✨

Just a few minor points below, but nothing fundamental.

@clokep clokep requested a review from anoadragon453 January 17, 2025 18:26
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

A few small things, but otherwise this looks nearly good to go!

clokep and others added 4 commits January 20, 2025 14:43
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
@clokep clokep requested a review from anoadragon453 January 20, 2025 19:46
@clokep
Copy link
Contributor Author

clokep commented Jan 20, 2025

Good catch @anoadragon453! I've added a bunch more tests to ensure this is all working as expected. 👍 Should be ready for merge, hopefully!

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for being so proactive with this one!

@anoadragon453 anoadragon453 merged commit ca290d3 into element-hq:develop Jan 21, 2025
39 checks passed
@clokep
Copy link
Contributor Author

clokep commented Jan 21, 2025

Thanks for all the reviews!

@clokep clokep deleted the custom-fields branch January 23, 2025 01:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants