[backend/federation] Support ASLike activities with content instead of _misskey_reaction
This commit is contained in:
parent
2f3408f3d7
commit
6d5f7b5f4a
2 changed files with 6 additions and 2 deletions
|
@ -269,8 +269,8 @@ public class ActivityHandlerService(
|
|||
await UnfollowAsync(followee, resolvedActor);
|
||||
break;
|
||||
case ASLike { Object: ASNote note } like:
|
||||
if (like.MisskeyReaction != null)
|
||||
await noteSvc.RemoveReactionFromNoteAsync(note, resolvedActor, like.MisskeyReaction);
|
||||
if ((like.Content ?? like.MisskeyReaction) is { } reaction)
|
||||
await noteSvc.RemoveReactionFromNoteAsync(note, resolvedActor, reaction);
|
||||
else
|
||||
await noteSvc.UnlikeNoteAsync(note, resolvedActor);
|
||||
break;
|
||||
|
|
|
@ -130,6 +130,10 @@ public class ASLike : ASActivity
|
|||
[JC(typeof(VC))]
|
||||
public string? MisskeyReaction { get; set; }
|
||||
|
||||
[J($"{Constants.ActivityStreamsNs}#content")]
|
||||
[JC(typeof(VC))]
|
||||
public string? Content { get; set; }
|
||||
|
||||
[J($"{Constants.ActivityStreamsNs}#tag")]
|
||||
[JC(typeof(ASTagConverter))]
|
||||
public List<ASTag>? Tags { get; set; }
|
||||
|
|
Loading…
Add table
Reference in a new issue