fix unsupported message

This commit is contained in:
Nicolas Constant 2020-07-08 18:41:21 -04:00
parent 5f5eeb9530
commit e52f2b8c73
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -81,7 +81,7 @@ namespace BirdsiteLive.Controllers
var activity = ApDeserializer.ProcessActivity(body);
// Do something
switch (activity.type)
switch (activity?.type)
{
case "Follow":
var succeeded = await _userService.FollowRequestedAsync(r.Headers["Signature"].First(), r.Method, r.Path, r.QueryString.ToString(), RequestHeaders(r.Headers), activity as ActivityFollow);
@ -95,7 +95,7 @@ namespace BirdsiteLive.Controllers
}
}
return Ok();
return Accepted();
}
private Dictionary<string, string> RequestHeaders(IHeaderDictionary header)