Improve and activate groups

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-09-29 09:53:48 +02:00
parent 1ca46a6863
commit 49a5725da3
131 changed files with 16440 additions and 1929 deletions

View File

@@ -16,8 +16,8 @@ export interface IActor {
summary: string;
preferredUsername: string;
suspended: boolean;
avatar: IPicture | null;
banner: IPicture | null;
avatar?: IPicture | null;
banner?: IPicture | null;
type: ActorType;
}

View File

@@ -8,7 +8,7 @@ export interface IConfig {
contact: string;
registrationsOpen: boolean;
registrationsWhitelist: boolean;
registrationsAllowlist: boolean;
demoMode: boolean;
countryCode: string;
location: {

View File

@@ -151,6 +151,7 @@ export interface IEvent {
tags: ITag[];
options: IEventOptions;
contacts: IActor[];
toEditJSON(): IEventEditJSON;
}
@@ -259,6 +260,8 @@ export class EventModel implements IEvent {
tags: ITag[] = [];
contacts: IActor[] = [];
options: IEventOptions = new EventOptions();
constructor(hash?: IEvent) {
@@ -296,6 +299,8 @@ export class EventModel implements IEvent {
this.physicalAddress = hash.physicalAddress ? new Address(hash.physicalAddress) : undefined;
this.participantStats = hash.participantStats;
this.contacts = hash.contacts;
this.tags = hash.tags;
if (hash.options) this.options = hash.options;
}
@@ -319,6 +324,9 @@ export class EventModel implements IEvent {
options: this.options,
// organizerActorId: this.organizerActor && this.organizerActor.id ? this.organizerActor.id : null,
attributedToId: this.attributedTo && this.attributedTo.id ? this.attributedTo.id : null,
contacts: this.contacts.map(({ id }) => ({
id,
})),
};
}
}
@@ -340,4 +348,5 @@ interface IEventEditJSON {
physicalAddress?: IAddress;
tags: string[];
options: IEventOptions;
contacts: { id?: string }[];
}

View File

@@ -1,5 +1,5 @@
export enum LoginErrorCode {
NEED_TO_LOGIN = "rouge",
NEED_TO_LOGIN = "need_to_login",
}
export enum LoginError {