switch mentions from _inbox tags to mentions relation

This commit is contained in:
2026-03-29 15:51:46 +02:00
parent f907657c6f
commit 9e8c37564f
4 changed files with 87 additions and 16 deletions

View File

@@ -17,7 +17,16 @@ var inboxCmd = &cobra.Command{
fmt.Fprintln(os.Stderr, err)
return
}
if nodes, err := d.ListNodes(db.ListFilter{TagPrefixes: []string{"_inbox::" + db.GetCurrentUser()}}); err == nil {
userID, err := d.GetUserByUsername(db.GetCurrentUser())
if err != nil {
fmt.Fprintln(os.Stderr, err)
return
}
if userID == "" {
output.PrintNodes(cmd.OutOrStdout(), nil, jsonFlag)
return
}
if nodes, err := d.ListNodes(db.ListFilter{MentionsUser: userID}); err == nil {
output.PrintNodes(cmd.OutOrStdout(), nodes, jsonFlag)
}
},