updated room group IDs

This commit is contained in:
2023-07-09 13:28:57 -04:00
parent 9a42797389
commit a273d4c8c8
5 changed files with 19 additions and 47 deletions

View File

@@ -12,52 +12,36 @@ try {
}
console.log('SERVERID:', serverID);
const idcommitment_1 = genId(serverID, 0n);
const idcommitment_2 = genId(serverID, 1n);
const idcommitment_3 = genId(serverID, 2n);
const idcommitment_4 = genId(serverID, 3n);
const idcommitment_5 = genId(serverID, 4n);
export const rooms: RoomGroupI[] = [
{
name: 'Discreetly',
id: genId(serverID, 'Discreetly'),
rooms: [
{
id: genId(serverID, 'General'),
name: 'General',
membership: { identityCommitments: [idcommitment_1, idcommitment_2, idcommitment_5] },
rateLimit: 1000
membership: { identityCommitments: [] },
rateLimit: 1000 // in ms
},
{
id: genId(serverID, 'Test'),
name: 'Test',
membership: {
identityCommitments: [
idcommitment_1,
idcommitment_2,
idcommitment_3,
idcommitment_4,
idcommitment_5
]
identityCommitments: []
},
rateLimit: 10000
},
{
id: genId(serverID, '1EthRoom'),
name: '1EthRoom',
membership: { identityCommitments: [] },
rateLimit: 100
rateLimit: 10000 // in ms
}
]
},
{
name: 'Events',
id: genId(serverID, 'Events'),
rooms: [
{
id: genId(serverID, 'Devconnect 2023'),
name: 'Devconnect 2023',
membership: { identityCommitments: [] },
rateLimit: 1000
rateLimit: 1000 // in ms
}
]
}

29
dist/config/rooms.js vendored
View File

@@ -13,51 +13,36 @@ catch (error) {
console.error('Error reading serverID from .env file!');
}
console.log('SERVERID:', serverID);
var idcommitment_1 = (0, discreetly_interfaces_1.genId)(serverID, 0n);
var idcommitment_2 = (0, discreetly_interfaces_1.genId)(serverID, 1n);
var idcommitment_3 = (0, discreetly_interfaces_1.genId)(serverID, 2n);
var idcommitment_4 = (0, discreetly_interfaces_1.genId)(serverID, 3n);
var idcommitment_5 = (0, discreetly_interfaces_1.genId)(serverID, 4n);
exports.rooms = [
{
name: 'Discreetly',
id: (0, discreetly_interfaces_1.genId)(serverID, 'Discreetly'),
rooms: [
{
id: (0, discreetly_interfaces_1.genId)(serverID, 'General'),
name: 'General',
membership: { identityCommitments: [idcommitment_1, idcommitment_2, idcommitment_5] },
rateLimit: 1000
membership: { identityCommitments: [] },
rateLimit: 1000 // in ms
},
{
id: (0, discreetly_interfaces_1.genId)(serverID, 'Test'),
name: 'Test',
membership: {
identityCommitments: [
idcommitment_1,
idcommitment_2,
idcommitment_3,
idcommitment_4,
idcommitment_5
]
identityCommitments: []
},
rateLimit: 10000
},
{
id: (0, discreetly_interfaces_1.genId)(serverID, '1EthRoom'),
name: '1EthRoom',
membership: { identityCommitments: [] },
rateLimit: 100
rateLimit: 10000 // in ms
}
]
},
{
name: 'Events',
id: (0, discreetly_interfaces_1.genId)(serverID, 'Events'),
rooms: [
{
id: (0, discreetly_interfaces_1.genId)(serverID, 'Devconnect 2023'),
name: 'Devconnect 2023',
membership: { identityCommitments: [] },
rateLimit: 1000
rateLimit: 1000 // in ms
}
]
}

1
dist/src/server.js vendored
View File

@@ -137,3 +137,4 @@ process.on('SIGINT', function () {
console.log('disconnecting redis');
redisClient.disconnect().then(process.exit());
});
// TODO we are going to need endpoints that take a password that will be in a .env file to generate new roomGroups, rooms, and claim codes

View File

@@ -17,7 +17,7 @@
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"discreetly-claimcodes": "^1.0.2",
"discreetly-interfaces": "^0.1.2",
"discreetly-interfaces": "^0.1.3",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"poseidon-lite": "^0.2.0",
@@ -32,4 +32,4 @@
"nodemon": "^2.0.22",
"typescript": "^5.1.6"
}
}
}

View File

@@ -167,3 +167,5 @@ process.on('SIGINT', () => {
console.log('disconnecting redis');
redisClient.disconnect().then(process.exit());
});
// TODO we are going to need endpoints that take a password that will be in a .env file to generate new roomGroups, rooms, and claim codes