Changes
2 changed files (+10/-8)
-
-
@@ -131,13 +131,15 @@ case ap.UndoType:// Unfollowing a user err = unfollow(ctx, activity) case ap.CreateType: // TODO: this is kinda a hack err = ap.OnObject(activity.Object, func(n *ap.Note) error { noteIRI := n.InReplyTo.GetLink().String() noteIRISplit := strings.Split(noteIRI, "/") n.Context = ap.IRI(strings.TrimSuffix(noteIRI, "/"+noteIRISplit[len(noteIRISplit)-1])) return createComment(ctx, n) }) if activity.Object.GetType() == ap.NoteType { // TODO: this is kinda a hack err = ap.OnObject(activity.Object, func(n *ap.Note) error { noteIRI := n.InReplyTo.GetLink().String() noteIRISplit := strings.Split(noteIRI, "/") n.Context = ap.IRI(strings.TrimSuffix(noteIRI, "/"+noteIRISplit[len(noteIRISplit)-1])) return createComment(ctx, n) }) } case ap.DeleteType: // Deleting a user err = delete(ctx, activity)
-
-
-
@@ -73,7 +73,7 @@ To: ap.ItemCollection{},} for i := int64(0); i < count; i++ { if followers[i].LoginType == auth.Federated { create.To.Append(ap.IRI(followers[i].GetIRI()+"/inbox")) create.To.Append(ap.IRI(followers[i].GetIRI() + "/inbox")) } } return activitypub.Send(user, &create)
-