Add group admin profiles

And other fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-08-27 11:53:24 +02:00
parent 8afda73214
commit 1984f71cbf
107 changed files with 3514 additions and 1146 deletions

View File

@@ -60,9 +60,11 @@ export class Actor implements IActor {
}
}
export function usernameWithDomain(actor: IActor): string {
export function usernameWithDomain(actor: IActor, force = false): string {
if (actor.domain) {
return `${actor.preferredUsername}@${actor.domain}`;
} else if (force) {
return `${actor.preferredUsername}@${window.location.hostname}`;
}
return actor.preferredUsername;
}

View File

@@ -16,6 +16,7 @@ export interface IComment {
deletedAt?: Date | string;
totalReplies: number;
insertedAt?: Date | string;
publishedAt?: Date | string;
}
export class CommentModel implements IComment {

View File

@@ -10,6 +10,8 @@ export interface IDiscussion {
actor?: IActor;
lastComment?: IComment;
comments: Paginate<IComment>;
updatedAt: string;
insertedAt: string;
}
export class Discussion implements IDiscussion {
@@ -27,6 +29,10 @@ export class Discussion implements IDiscussion {
lastComment?: IComment = undefined;
insertedAt: string = "";
updatedAt: string = "";
constructor(hash?: IDiscussion) {
if (!hash) return;
@@ -40,5 +46,7 @@ export class Discussion implements IDiscussion {
this.creator = hash.creator;
this.actor = hash.actor;
this.lastComment = hash.lastComment;
this.insertedAt = hash.insertedAt;
this.updatedAt = hash.updatedAt;
}
}