feat: add gt mail mark-read command for desire path (bd-rjuu6)
Adds mark-read and mark-unread commands that allow marking messages as read without archiving them. Uses a "read" label to track status. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
2c73cf35f1
commit
1418b1123a
@@ -256,7 +256,7 @@ func (bm *BeadsMessage) ToMessage() *Message {
|
||||
Subject: bm.Title,
|
||||
Body: bm.Description,
|
||||
Timestamp: bm.CreatedAt,
|
||||
Read: bm.Status == "closed",
|
||||
Read: bm.Status == "closed" || bm.HasLabel("read"),
|
||||
Priority: priority,
|
||||
Type: msgType,
|
||||
ThreadID: bm.threadID,
|
||||
@@ -266,6 +266,16 @@ func (bm *BeadsMessage) ToMessage() *Message {
|
||||
}
|
||||
}
|
||||
|
||||
// HasLabel checks if the message has a specific label.
|
||||
func (bm *BeadsMessage) HasLabel(label string) bool {
|
||||
for _, l := range bm.Labels {
|
||||
if l == label {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// PriorityToBeads converts a GGT Priority to beads priority integer.
|
||||
// Returns: 0=urgent, 1=high, 2=normal, 3=low
|
||||
func PriorityToBeads(p Priority) int {
|
||||
|
||||
Reference in New Issue
Block a user