Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: list memo comments
Stevena6be658f4260
diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.goindex c20f7e22b..3053b6c6f 100644--- a/server/router/api/v1/memo_service.go+++ b/server/router/api/v1/memo_service.go@@ -508,10 +508,22 @@ func (s *APIV1Service) ListMemoComments(ctx context.Context, request *v1pb.ListMif err != nil {return nil, status.Errorf(codes.Internal, "failed to get memo")}++ currentUser, err := s.GetCurrentUser(ctx)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get user")+ }+ var memoFilter string+ if currentUser == nil {+ memoFilter = `visibility == "PUBLIC"`+ } else {+ memoFilter = fmt.Sprintf(`creator_id == %d || visibility in ["PUBLIC", "PROTECTED"]`, currentUser.ID)+ }memoRelationComment := store.MemoRelationCommentmemoRelations, err := s.Store.ListMemoRelations(ctx, &store.FindMemoRelation{RelatedMemoID: &memo.ID,Type: &memoRelationComment,+ MemoFilter: &memoFilter,})if err != nil {return nil, status.Errorf(codes.Internal, "failed to list memo relations")