Browse Source

fix url missing with some AP softwares

master
Nicolas Constant 6 months ago
parent
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. +1
    -0
      .gitignore
  2. +4
    -1
      src/BirdsiteLive.Domain/ActivityPubService.cs

+ 1
- 0
.gitignore View File

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

+ 4
- 1
src/BirdsiteLive.Domain/ActivityPubService.cs 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)


Loading…
Cancel
Save