File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -354,10 +354,18 @@ async fn migrate_threepids(
354
354
} = threepid_res. into_synapse ( "reading threepid" ) ?;
355
355
let created_at: DateTime < Utc > = added_at. into ( ) ;
356
356
357
- let username = synapse_user_id
357
+ let Ok ( username) = synapse_user_id
358
358
. extract_localpart ( & state. server_name )
359
- . into_extract_localpart ( synapse_user_id. clone ( ) ) ?
360
- . to_owned ( ) ;
359
+ . into_extract_localpart ( synapse_user_id. clone ( ) )
360
+ . map ( str:: to_owned)
361
+ else {
362
+ // HACK(matrix.org): for some reason, m.org has threepids for the :vector.im
363
+ // server. We skip them, and log for potential other servers.
364
+ if !synapse_user_id. 0 . ends_with ( ":vector.im" ) {
365
+ tracing:: warn!( "Unexpected MXID for threepid: {}" , synapse_user_id) ;
366
+ }
367
+ continue ;
368
+ } ;
361
369
let Some ( user_infos) = state. users . get ( username. as_str ( ) ) . copied ( ) else {
362
370
return Err ( Error :: MissingUserFromDependentTable {
363
371
table : "user_threepids" . to_owned ( ) ,
You can’t perform that action at this time.
0 commit comments