refactor: replace explicit fields with tag-based property system

This commit is contained in:
2026-03-27 02:11:46 +01:00
parent 2d4cff717b
commit b2225cff7b
17 changed files with 485 additions and 825 deletions

View File

@@ -3,23 +3,23 @@ package cmd
import (
"axolotl/db"
"axolotl/output"
"fmt"
"os"
"github.com/spf13/cobra"
)
var inboxCmd = &cobra.Command{
Use: "inbox",
Short: "Show your inbox",
Use: "inbox", Short: "Show your inbox",
Run: func(cmd *cobra.Command, args []string) {
d, err := db.GetDB()
user := db.GetCurrentUser()
nodes, err := d.ListNodes(db.ListFilter{
Inbox: user,
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
return
}
output.PrintNodes(cmd.OutOrStdout(), nodes, jsonFlag)
if nodes, err := d.ListNodes(db.ListFilter{TagPrefixes: []string{"_inbox::" + db.GetCurrentUser()}}); err == nil {
output.PrintNodes(cmd.OutOrStdout(), nodes, jsonFlag)
}
},
}