forked from andyburke/autonomous.contact
feature: require invites
This commit is contained in:
parent
8b70172493
commit
a3302d2eff
22 changed files with 385 additions and 482 deletions
|
|
@ -41,12 +41,7 @@ type TOPIC_EVENT_CACHE_ENTRY = {
|
|||
export function VALIDATE_EVENT(event: EVENT) {
|
||||
const errors: any[] = [];
|
||||
|
||||
const {
|
||||
groups: {
|
||||
type,
|
||||
id
|
||||
}
|
||||
} = /^(?<type>\w+)\:(?<id>[A-Za-z-]+)$/.exec(event.id ?? '') ?? { groups: {} };
|
||||
const [type, id] = (event.id ?? '').split(':', 2);
|
||||
|
||||
if (typeof type !== 'string' || type.length === 0) {
|
||||
errors.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue