tangled
alpha
login
or
join now
bad-example.com
/
spacedust-utils
6
fork
atom
demos for spacedust
6
fork
atom
overview
issues
pulls
pipelines
working again (no pw checking)
bad-example.com
8 months ago
1ef3dee5
6818fb41
+5
-5
2 changed files
expand all
collapse all
unified
split
atproto-notifications
src
components
setup
WithServerHello.tsx
server
index.js
+4
-4
atproto-notifications/src/components/setup/WithServerHello.tsx
···
11
11
const [whoamiKey, setWhoamiKey] = useState(0);
12
12
const [whoamiInfo, setWhoamiInfo] = useState(null);
13
13
14
14
-
const childrenFor = useCallback((did, role) => {
14
14
+
const childrenFor = useCallback((did, role, parentChildren) => {
15
15
if (role === 'public') {
16
16
return <SecretPassword did={did} role={role} />;
17
17
}
18
18
-
return 'hiiiiiiii ' + role;
18
18
+
return parentChildren;
19
19
})
20
20
21
21
const reloadConnect = useCallback(e => {
···
71
71
ok={({ did, role, webPushPublicKey }) => (
72
72
<Chrome user={{ did, role }} onLogout={handleLogout}>
73
73
<PushServerContext.Provider value={webPushPublicKey}>
74
74
-
{childrenFor(did, role)}
74
74
+
{childrenFor(did, role, children)}
75
75
</PushServerContext.Provider>
76
76
</Chrome>
77
77
)}
···
81
81
return (
82
82
<Chrome user={{ did, role }} onLogout={handleLogout}>
83
83
<PushServerContext.Provider value={webPushPublicKey}>
84
84
-
{childrenFor(did, role)}
84
84
+
{childrenFor(did, role, children)}
85
85
</PushServerContext.Provider>
86
86
</Chrome>
87
87
);
+1
-1
server/index.js
···
299
299
};
300
300
301
301
const handleSubscribe = async (db, req, res, appSecret, adminDid) => {
302
302
-
let info = getAccountCookie(req, res, appSecret, adminDid);
302
302
+
let info = getAccountCookie(req, res, appSecret, adminDid, true);
303
303
if (!info) return res.writeHead(400).end(JSON.stringify({ reason: 'failed to verify cookie signature' }));
304
304
const [did, session, _isAdmin] = info;
305
305
const body = await getRequesBody(req);