A vibe coded tangled fork which supports pijul.
at 3f6e50b7512609295303f4756793a6ff3238c847 47 lines 701 B view raw
1package models 2 3import ( 4 "time" 5 6 "tangled.org/core/api/tangled" 7) 8 9type Follow struct { 10 UserDid string 11 SubjectDid string 12 FollowedAt time.Time 13 Rkey string 14} 15 16func (f *Follow) AsRecord() tangled.GraphFollow { 17 return tangled.GraphFollow{ 18 Subject: f.SubjectDid, 19 CreatedAt: f.FollowedAt.Format(time.RFC3339), 20 } 21} 22 23type FollowStats struct { 24 Followers int64 25 Following int64 26} 27 28type FollowStatus int 29 30const ( 31 IsNotFollowing FollowStatus = iota 32 IsFollowing 33 IsSelf 34) 35 36func (s FollowStatus) String() string { 37 switch s { 38 case IsNotFollowing: 39 return "IsNotFollowing" 40 case IsFollowing: 41 return "IsFollowing" 42 case IsSelf: 43 return "IsSelf" 44 default: 45 return "IsNotFollowing" 46 } 47}