[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);
|
await UnfollowAsync(followee, resolvedActor);
|
||||||
break;
|
break;
|
||||||
case ASLike { Object: ASNote note } like:
|
case ASLike { Object: ASNote note } like:
|
||||||
if (like.MisskeyReaction != null)
|
if ((like.Content ?? like.MisskeyReaction) is { } reaction)
|
||||||
await noteSvc.RemoveReactionFromNoteAsync(note, resolvedActor, like.MisskeyReaction);
|
await noteSvc.RemoveReactionFromNoteAsync(note, resolvedActor, reaction);
|
||||||
else
|
else
|
||||||
await noteSvc.UnlikeNoteAsync(note, resolvedActor);
|
await noteSvc.UnlikeNoteAsync(note, resolvedActor);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -130,6 +130,10 @@ public class ASLike : ASActivity
|
||||||
[JC(typeof(VC))]
|
[JC(typeof(VC))]
|
||||||
public string? MisskeyReaction { get; set; }
|
public string? MisskeyReaction { get; set; }
|
||||||
|
|
||||||
|
[J($"{Constants.ActivityStreamsNs}#content")]
|
||||||
|
[JC(typeof(VC))]
|
||||||
|
public string? Content { get; set; }
|
||||||
|
|
||||||
[J($"{Constants.ActivityStreamsNs}#tag")]
|
[J($"{Constants.ActivityStreamsNs}#tag")]
|
||||||
[JC(typeof(ASTagConverter))]
|
[JC(typeof(ASTagConverter))]
|
||||||
public List<ASTag>? Tags { get; set; }
|
public List<ASTag>? Tags { get; set; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue