adds labels to accounts that have created records outside of Bluesky
23
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add Germ, support non-expiry labels

+23 -6
+15 -6
cmd/recordcollector/main.go
··· 36 36 } 37 37 38 38 var labelPrefixes map[string]string 39 + var nonExpiryPrefixes map[string]bool 39 40 40 41 func init() { 41 42 labelPrefixes = make(map[string]string) 43 + nonExpiryPrefixes = make(map[string]bool) 44 + 42 45 for _, app := range pkg.Applications { 43 46 labelPrefixes[app.NSID] = app.Label 47 + nonExpiryPrefixes[app.Label] = app.NonExpiry 44 48 } 45 49 } 46 50 ··· 204 208 return nil 205 209 } 206 210 207 - var labelDuration int64 = 24 * 30 211 + eventLabel := toolsozone.ModerationDefs_ModEventLabel{ 212 + CreateLabelVals: []string{label}, 213 + NegateLabelVals: []string{}, 214 + } 215 + 216 + if nonExpiry := nonExpiryPrefixes[label]; !nonExpiry { 217 + var labelDuration int64 = 24 * 30 218 + eventLabel.DurationInHours = &labelDuration 219 + } 220 + 208 221 input := &toolsozone.ModerationEmitEvent_Input{ 209 222 CreatedBy: RecordCollectorDid, 210 223 Event: &toolsozone.ModerationEmitEvent_Input_Event{ 211 - ModerationDefs_ModEventLabel: &toolsozone.ModerationDefs_ModEventLabel{ 212 - CreateLabelVals: []string{label}, 213 - NegateLabelVals: []string{}, 214 - DurationInHours: &labelDuration, 215 - }, 224 + ModerationDefs_ModEventLabel: &eventLabel, 216 225 }, 217 226 Subject: &toolsozone.ModerationEmitEvent_Input_Subject{ 218 227 AdminDefs_RepoRef: &comatproto.AdminDefs_RepoRef{
+8
pkg/apps.go
··· 5 5 Description string 6 6 NSID string 7 7 Label string 8 + NonExpiry bool 8 9 } 9 10 10 11 var Applications = []Application{ ··· 271 272 Description: "a fast, modern browser for the npm registry", 272 273 NSID: "dev.npmx", 273 274 Label: "dev-npmx", 275 + }, 276 + { 277 + Name: "Germ", 278 + Description: "End-to-end encrypted DMs right from your AT Protocol handle", 279 + NSID: "com.germnetwork", 280 + Label: "com-germnetwork", 281 + NonExpiry: true, 274 282 }, 275 283 }