diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-07-16 02:38:46 +0200 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-07-16 02:38:46 +0200 |
| commit | 53ede6765a1583538b2abc3142d858464b3cf01c (patch) | |
| tree | 422143cbc37098ebe0feb10b581c555e9f600005 /fetchers/jetstream.go | |
| parent | 2f4f118bb755e92961c1225c49ff30ab4951daff (diff) | |
| download | llostre-53ede6765a1583538b2abc3142d858464b3cf01c.tar.xz llostre-53ede6765a1583538b2abc3142d858464b3cf01c.zip | |
Diffstat (limited to 'fetchers/jetstream.go')
| -rw-r--r-- | fetchers/jetstream.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fetchers/jetstream.go b/fetchers/jetstream.go index 866533a..b73137e 100644 --- a/fetchers/jetstream.go +++ b/fetchers/jetstream.go @@ -98,6 +98,7 @@ func handleJetstreamPost(conf *Config, did, uri string, commit *jetstreamCommit) if commit.Operation == "delete" { if _, found := conf.Cache.Get(uri); found { conf.Cache.Delete(uri) + conf.Cache.AddPostCount(did, -1) } return } @@ -113,6 +114,11 @@ func handleJetstreamPost(conf *Config, did, uri string, commit *jetstreamCommit) // cache the result if _, err := parseAppBskyFeedPostRecord(rawRecord, author, conf); err != nil { conf.Logger.Warn("jetstream: failed to parse post", "uri", uri, "error", err) + return + } + + if commit.Operation == "create" { + conf.Cache.AddPostCount(did, 1) } } |
