feat(trust): trust-gated invites, open-request claim opportunity, claim-author rule (#27)

This commit is contained in:
Smokey committed 2026-10-28 05:46:38 -06:00
1 parent c23fcdd73c
commit a2d69507e7
2 files changed
+48 -5

No files matched your search

+12
View File
@@ -119,6 +119,18 @@ func (s *MessageStore) ByMsgID(msgID string) (Message, bool) {
return Message{}, false
}
// Answered reports whether crow has claimed, delivered or declined the referent.
func (s *MessageStore) Answered(nestID, referentID, crow string) bool {
s.mu.Lock()
defer s.mu.Unlock()
for _, m := range s.log[nestID] {
if m.Author == crow && m.RefersTo == referentID && responsiveKind[m.Kind] {
return true
}
}
return false
}
// FirstClaim returns the author of the first claim against a message, and
// whether any claim exists.
func (s *MessageStore) FirstClaim(nestID, referentID string) (string, bool) {