fix url missing with some AP softwares

This commit is contained in:
Nicolas Constant 2021-04-13 01:25:36 -04:00
parent 32ef34a094
commit d0f817e1a8
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688
2 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View file

@ -351,3 +351,4 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
/src/BSLManager/Properties/launchSettings.json

View file

@ -46,7 +46,10 @@ namespace BirdsiteLive.Domain
httpClient.DefaultRequestHeaders.Add("Accept", "application/activity+json");
var result = await httpClient.GetAsync(objectId);
var content = await result.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<Actor>(content);
var actor = JsonConvert.DeserializeObject<Actor>(content);
if (string.IsNullOrWhiteSpace(actor.url)) actor.url = objectId;
return actor;
}
public async Task PostNewNoteActivity(Note note, string username, string noteId, string targetHost, string targetInbox)