tangled
alpha
login
or
join now
willdot.net
/
tangled-fork
forked from
tangled.org/core
Monorepo for Tangled
0
fork
atom
overview
issues
pulls
pipelines
appview: did resolution exclusion list
anirudh.fi
9 months ago
757c8d27
4793720c
+10
-2
3 changed files
expand all
collapse all
unified
split
appview
pages
templates
timeline.html
user
login.html
state
middleware.go
+1
-1
appview/pages/templates/timeline.html
···
23
23
</div>
24
24
<div class="italic text-lg">
25
25
tightly-knit social coding, <a href="/login" class="underline inline-flex gap-1 items-center">join now {{ i "arrow-right" "w-4 h-4" }}</a>
26
26
-
<p class="pt-5 px-10 text-sm text-gray-500 dark:text-gray-400">Join our IRC channel: <a href="https://web.libera.chat/#tangled"><code>#tangled</code> on Libera Chat</a>.
26
26
+
<p class="pt-5 px-10 text-sm text-gray-500 dark:text-gray-400">Join our <a href="https://chat.tangled.sh">Discord</a>or IRC channel: <a href="https://web.libera.chat/#tangled"><code>#tangled</code> on Libera Chat</a>.
27
27
Read an introduction to Tangled <a href="https://blog.tangled.sh/intro">here</a>.</p>
28
28
</div>
29
29
</div>
+1
-1
appview/pages/templates/user/login.html
···
70
70
</button>
71
71
</form>
72
72
<p class="text-sm text-gray-500">
73
73
-
Join our IRC channel:
73
73
+
Join our <a href="https://chat.tangled.sh">Discord</a> or IRC channel:
74
74
<a href="https://web.libera.chat/#tangled"
75
75
><code>#tangled</code> on Libera Chat</a
76
76
>.
+8
appview/state/middleware.go
···
8
8
"strings"
9
9
"time"
10
10
11
11
+
"slices"
12
12
+
11
13
comatproto "github.com/bluesky-social/indigo/api/atproto"
12
14
"github.com/bluesky-social/indigo/atproto/identity"
13
15
"github.com/bluesky-social/indigo/xrpc"
···
174
176
}
175
177
176
178
func ResolveIdent(s *State) Middleware {
179
179
+
excluded := []string{"favicon.ico"}
180
180
+
177
181
return func(next http.Handler) http.Handler {
178
182
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
179
183
didOrHandle := chi.URLParam(req, "user")
184
184
+
if slices.Contains(excluded, didOrHandle) {
185
185
+
next.ServeHTTP(w, req)
186
186
+
return
187
187
+
}
180
188
181
189
id, err := s.resolver.ResolveIdent(req.Context(), didOrHandle)
182
190
if err != nil {