Skip to content

Best way to rename user localpart #19328

@lautriva

Description

@lautriva

Hi,

One of my users need a change of their localpart
They are doing a gender transition and don't want to see their deadname anymore

Is it possible to change @deadname:example.com to @newname:example.com while preserving all their messages / rooms and user history? (ie. when the user connects to their client, everything is the same as before)

My server is not federated, which lead me to think it may be easier
I use synapse as a docker container with a PGsql database

I understand that it may not be a simple task, but maybe you could give me some pointers to SQL queries / scripts to run

The alternative would be to create a new user but all history would either be lost or have a duplicated user joined in their rooms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions