(READ ONLY) Margin is an open annotation layer for the internet. Powered by the AT Protocol.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix replies

+21 -7
+18 -4
backend/internal/api/notes.go
··· 732 732 return 733 733 } 734 734 735 - if req.ParentURI == "" || req.ParentCID == "" { 736 - WriteBadRequest(w, "parentUri and parentCid are required") 735 + if req.ParentURI == "" { 736 + WriteBadRequest(w, "parentUri is required") 737 737 return 738 738 } 739 - if req.RootURI == "" || req.RootCID == "" { 740 - WriteBadRequest(w, "rootUri and rootCid are required") 739 + if req.ParentCID == "" { 740 + req.ParentCID = s.resolveCID(r, req.ParentURI) 741 + } 742 + if req.ParentCID == "" { 743 + WriteBadRequest(w, "parentCid is required and could not be resolved") 744 + return 745 + } 746 + if req.RootURI == "" { 747 + WriteBadRequest(w, "rootUri is required") 748 + return 749 + } 750 + if req.RootCID == "" { 751 + req.RootCID = s.resolveCID(r, req.RootURI) 752 + } 753 + if req.RootCID == "" { 754 + WriteBadRequest(w, "rootCid is required and could not be resolved") 741 755 return 742 756 } 743 757 if req.Text == "" {
+3 -3
web/src/views/content/AnnotationDetail.tsx
··· 153 153 : targetUri; 154 154 const parentCid = replyingTo ? replyingTo.cid : annotation.cid; 155 155 156 - if (!parentUri || !parentCid || !annotation.cid) 156 + if (!parentUri) 157 157 throw new Error("Missing parent info"); 158 158 159 159 await createReply( 160 160 parentUri, 161 - parentCid, 161 + parentCid || "", 162 162 targetUri, 163 - annotation.cid, 163 + annotation.cid || "", 164 164 replyText, 165 165 ); 166 166