Skip to content

Commit d7de4da

Browse files
authored
Fix: make profile pictures imported in Synapse again (#881)
## Description ### Summary <!--Brief description of what this PR does.--> Bug: his unexpected comment explains why new users don't have their avatar imported through our SSO to the Matrix server. Feature: it seems the MAS (Matrix Authentication Service) now supports the `picture` claim of the OIDC scope, so we add it [back]. Source: https://github.com/element-hq/matrix-authentication-service/blob/1bd1b00524a62e365cf06b3745d298a53df69c90/crates/jose/src/claims.rs#L525 ## Type of Change We present it as a feature but it's actually a bug fix... - [x] 🐛 Bug fix (non-breaking change which fixes an issue) - [x] ✨ New feature (non-breaking change which adds functionality) - [ ] 🔨 Refactor (non-breaking change that neither fixes a bug nor adds a feature) - [ ] 🔧 Infra CI/CD (changes to configs of workflows) - [ ] 💥 BREAKING CHANGE (fix or feature that require a new minimal version of the front-end) ## Impact & Scope - [ ] Core functionality changes - [ ] Single module changes - [ ] Multiple modules changes - [ ] Database migrations required - [x] Other: 3rd party service integration ## Testing - [ ] Added/modified tests that pass the CI - [ ] Tested in a pre-prod - [ ] Tested this locally - [x] Will be tested in prod directly... ## Documentation - [ ] Updated docs accordingly (docs.myecl.fr) : <!--[Docs#0 - Title](https://github.com/aeecleclair/myecl-documentation/pull/0)--> - [ ] Code includes docstrings - [x] No documentation needed
1 parent f06b9cb commit d7de4da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/utils/auth/providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def get_userinfo(cls, user: models_users.CoreUser):
240240

241241
return {
242242
"sub": user.id,
243-
# "picture": f"https://hyperion.myecl.fr/users/{user.id}/profile-picture",
243+
"picture": f"https://hyperion.myecl.fr/users/{user.id}/profile-picture",
244244
# Matrix does not support special characters in username
245245
"username": username,
246246
"displayname": user.full_name,

0 commit comments

Comments
 (0)