Skip to content

Commit c969553

Browse files
authored
Merge pull request #1 from planetary-social/allow_more_kinds
Allow more kinds
2 parents 6290be9 + d7c426c commit c969553

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

strfry/plugins/allowed_rules.js

+8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ const ALLOWED = {
66
},
77
eventKinds: [
88
0, // Metadata
9+
1, // Short Text Note
910
3, // Contacts
11+
4, // Encrypted Direct Messages
12+
5, // Event deletion
13+
6, // Repost
14+
7, // Reaction
1015
1059, // Gift wrap messages
16+
10000, // Mute list
1117
10002, // Relay list metadata
18+
30023, // Long-form Content
1219
],
1320
};
1421

@@ -33,6 +40,7 @@ rl.on("line", (line) => {
3340
const isAllowedPub = ALLOWED.pubs.hasOwnProperty(req.event.pubkey);
3441
const isAllowedEventKind = ALLOWED.eventKinds.includes(req.event.kind);
3542

43+
// Allowed npubs can publish any event kind, other npubs can only publish the allowed event kinds
3644
if (isAllowedPub || isAllowedEventKind) {
3745
res.action = "accept";
3846
} else {

0 commit comments

Comments
 (0)