[backend/federation] Improve logging regarding a renamed variable

This commit is contained in:
Laura Hausmann 2024-04-27 20:17:39 +02:00
parent 0b77107b1e
commit a20d50f793
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -42,10 +42,10 @@ public class ActivityHandlerService(
var resolvedActor = await userResolver.ResolveAsync(activity.Actor.Id); var resolvedActor = await userResolver.ResolveAsync(activity.Actor.Id);
if (authenticatedUserId == null) if (authenticatedUserId == null)
throw GracefulException throw GracefulException
.UnprocessableEntity("Refusing to process activity without authFetchUserId"); .UnprocessableEntity("Refusing to process activity without authenticatedUserId");
if (resolvedActor.Id != authenticatedUserId && authenticatedUserId != null) if (resolvedActor.Id != authenticatedUserId && authenticatedUserId != null)
throw GracefulException throw GracefulException
.UnprocessableEntity($"Authorized fetch user id {authenticatedUserId} doesn't match resolved actor id {resolvedActor.Id}"); .UnprocessableEntity($"Authenticated user id {authenticatedUserId} doesn't match resolved actor id {resolvedActor.Id}");
if (new Uri(activity.Actor.Id).Host != new Uri(activity.Id).Host) if (new Uri(activity.Actor.Id).Host != new Uri(activity.Id).Host)
throw GracefulException throw GracefulException
.UnprocessableEntity($"Activity identifier ({activity.Actor.Id}) host doesn't match actor identifier ({activity.Id}) host"); .UnprocessableEntity($"Activity identifier ({activity.Actor.Id}) host doesn't match actor identifier ({activity.Id}) host");