Skip to content

armgit / memos

Public Imported from GitHub
0

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.

fix: memo content snippet

Steven446e38f15be6
diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.go
index 8abcf745f..bd8f94410 100644
--- a/server/router/api/v1/memo_service.go
+++ b/server/router/api/v1/memo_service.go
@@ -1301,8 +1301,5 @@ func getMemoContentSnippet(content string) (string, error) {
}
plainText := renderer.NewStringRenderer().Render(nodes)
- if len(plainText) > 100 {
- return plainText[:100] + "...", nil
- }
return plainText, nil
}
diff --git a/store/db/mysql/common.go b/store/db/mysql/common.go
index 37ffe296a..71598749a 100644
--- a/store/db/mysql/common.go
+++ b/store/db/mysql/common.go
@@ -4,6 +4,7 @@ import "google.golang.org/protobuf/encoding/protojson"
var (
protojsonUnmarshaler = protojson.UnmarshalOptions{
+ AllowPartial: true,
DiscardUnknown: true,
}
)