CONFIG.signUp.defaultFollows

This commit is contained in:
Martti Malmi 2023-12-18 09:54:46 +02:00
parent 73026ff152
commit ad449bc295
6 changed files with 12 additions and 8 deletions

View File

@ -18,7 +18,8 @@
"zapPool": true
},
"signUp": {
"moderation": true
"moderation": true,
"defaultFollows": ["npub1sn0rtcjcf543gj4wsg7fa59s700d5ztys5ctj0g69g2x6802npjqhjjtws"]
},
"defaultPreferences": {
"checkSigs": true,

View File

@ -18,7 +18,8 @@
"zapPool": true
},
"signUp": {
"moderation": false
"moderation": false,
"defaultFollows": ["npub1wnwwcv0a8wx0m9stck34ajlwhzuua68ts8mw3kjvspn42dcfyjxs4n95l8"]
},
"defaultPreferences": {
"checkSigs": true,

View File

@ -64,6 +64,7 @@ declare const CONFIG: {
};
signUp: {
moderation: boolean;
defaultFollows: Array<string>;
};
media: {
bypassImgProxyError: boolean;

View File

@ -12,7 +12,7 @@ import { unixNowMs } from "@snort/shared";
import * as secp from "@noble/curves/secp256k1";
import * as utils from "@noble/curves/abstract/utils";
import { Blasters, SnortPubKey } from "@/Const";
import { Blasters } from "@/Const";
import { LoginStore, UserPreferences, LoginSession, LoginSessionType, SnortAppData, Newest } from "@/Login";
import { generateBip39Entropy, entropyToPrivateKey } from "@/nip6";
import { bech32ToHex, dedupeById, deleteRefCode, getCountry, sanitizeRelayUrl, unwrap } from "@/SnortUtils";
@ -124,7 +124,8 @@ export async function generateNewLogin(
const publisher = EventPublisher.privateKey(privateKey);
// Create new contact list following self and site account
const ev = await publisher.contactList([bech32ToHex(SnortPubKey), publicKey].map(a => ["p", a]));
const contactList = [publicKey, ...CONFIG.signUp.defaultFollows.map(a => bech32ToHex(a))].map(a => ["p", a]);
const ev = await publisher.contactList(contactList);
system.BroadcastEvent(ev);
// Create relay metadata event

View File

@ -347,6 +347,9 @@
"defaultMessage": "Non-Zap",
"description": "Non-Zap, Regular LN payment"
},
"Awq32I": {
"defaultMessage": "Push notifications"
},
"AxDOiG": {
"defaultMessage": "Months"
},
@ -1489,9 +1492,6 @@
"ttxS0b": {
"defaultMessage": "Supporter Badge"
},
"tzMNF3": {
"defaultMessage": "Push notifications"
},
"u+LyXc": {
"defaultMessage": "Interactions"
},

View File

@ -114,6 +114,7 @@
"AkCxS/": "Reason",
"Am8glJ": "Game",
"AnLrRC": "Non-Zap",
"Awq32I": "Push notifications",
"AxDOiG": "Months",
"AyGauy": "Login",
"B4C47Y": "name too short",
@ -491,7 +492,6 @@
"thnRpU": "Getting NIP-05 verified can help:",
"tjpYlr": "Relay Metrics",
"ttxS0b": "Supporter Badge",
"tzMNF3": "Push notifications",
"u+LyXc": "Interactions",
"u/vOPu": "Paid",
"u4bHcR": "Check out the code here: {link}",