alpha
Login
or
Join now
dunkirk.sh
/
core
forked from
tangled.org/core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
minor tweaks, add logging
author
Akshay
date
1 year ago
(Mar 27, 2025, 9:25 PM UTC)
commit
6d84fad3
6d84fad3d97469aebcca3fdbdb2ef4852f33d41b
parent
3f0650f6
3f0650f6ce8ad85b0eaeca29f9d41bb9eae80198
+7
-1
3 changed files
Expand all
Collapse all
Unified
Split
appview
state
state.go
jetstream
jetstream.go
knotserver
handler.go
+1
-1
appview/state/state.go
Reviewed
···
63
63
jc, err := jetstream.NewJetstreamClient(
64
64
config.JetstreamEndpoint,
65
65
"appview",
66
66
-
[]string{tangled.GraphFollowNSID},
66
66
+
[]string{tangled.GraphFollowNSID, tangled.FeedStarNSID},
67
67
nil,
68
68
slog.Default(),
69
69
wrapper,
+5
jetstream/jetstream.go
Reviewed
···
43
43
return
44
44
}
45
45
46
46
+
j.l.Info("adding did to in-memory filter", "did", did)
46
47
j.mu.Lock()
47
48
j.wantedDids[did] = struct{}{}
48
49
j.mu.Unlock()
···
51
52
type processor func(context.Context, *models.Event) error
52
53
53
54
func (j *JetstreamClient) withDidFilter(processFunc processor) processor {
55
55
+
// empty filter => all dids allowed
56
56
+
if len(j.wantedDids) == 0 {
57
57
+
return processFunc
58
58
+
}
54
59
// since this closure references j.WantedDids; it should auto-update
55
60
// existing instances of the closure when j.WantedDids is mutated
56
61
return func(ctx context.Context, evt *models.Event) error {
+1
knotserver/handler.go
Reviewed
···
60
60
if err != nil {
61
61
return nil, fmt.Errorf("failed to get all Dids: %w", err)
62
62
}
63
63
+
63
64
if len(dids) > 0 {
64
65
h.knotInitialized = true
65
66
close(h.init)