[feature] Self-serve email change for users (#2957)

* [feature] Email change

* frontend stuff for changing email

* docs

* tests etc

* differentiate more clearly between local user+account and account

* populate user
This commit is contained in:
tobi 2024-06-06 15:43:25 +02:00 committed by GitHub
commit bcda048eab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 1118 additions and 309 deletions

View file

@ -113,7 +113,7 @@ func (f *federatingDB) deleteAccount(
log.Debugf(ctx, "deleting account: %s", account.URI)
f.state.Workers.Federator.Queue.Push(&messages.FromFediAPI{
APObjectType: ap.ObjectProfile,
APObjectType: ap.ActorPerson,
APActivityType: ap.ActivityDelete,
GTSModel: account,
Receiving: receiving,

View file

@ -171,7 +171,7 @@ func (f *federatingDB) Move(ctx context.Context, move vocab.ActivityStreamsMove)
// We had a Move already or stored a new Move.
// Pass back to a worker for async processing.
f.state.Workers.Federator.Queue.Push(&messages.FromFediAPI{
APObjectType: ap.ObjectProfile,
APObjectType: ap.ActorPerson,
APActivityType: ap.ActivityMove,
GTSModel: stubMove,
Requesting: requestingAcct,

View file

@ -78,7 +78,7 @@ func (suite *MoveTestSuite) TestMove() {
// Should be a message heading to the processor.
msg, _ := suite.getFederatorMsg(5 * time.Second)
suite.Equal(ap.ObjectProfile, msg.APObjectType)
suite.Equal(ap.ActorPerson, msg.APObjectType)
suite.Equal(ap.ActivityMove, msg.APActivityType)
// Stub Move should be on the message.
@ -95,7 +95,7 @@ func (suite *MoveTestSuite) TestMove() {
// Should be a message heading to the processor
// since this is just a straight up retry.
msg, _ = suite.getFederatorMsg(5 * time.Second)
suite.Equal(ap.ObjectProfile, msg.APObjectType)
suite.Equal(ap.ActorPerson, msg.APObjectType)
suite.Equal(ap.ActivityMove, msg.APActivityType)
// Same as the first Move, but with a different ID.
@ -115,7 +115,7 @@ func (suite *MoveTestSuite) TestMove() {
// Should be a message heading to the processor
// since this is just a retry with a different ID.
msg, _ = suite.getFederatorMsg(5 * time.Second)
suite.Equal(ap.ObjectProfile, msg.APObjectType)
suite.Equal(ap.ActorPerson, msg.APObjectType)
suite.Equal(ap.ActivityMove, msg.APActivityType)
}

View file

@ -99,7 +99,7 @@ func (f *federatingDB) updateAccountable(ctx context.Context, receivingAcct *gts
// updating of eg., avatar/header, emojis, etc. The actual db
// inserts/updates will take place there.
f.state.Workers.Federator.Queue.Push(&messages.FromFediAPI{
APObjectType: ap.ObjectProfile,
APObjectType: ap.ActorPerson,
APActivityType: ap.ActivityUpdate,
GTSModel: requestingAcct,
APObject: accountable,