Add group admin profiles
And other fixes Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export interface IComment {
|
||||
deletedAt?: Date | string;
|
||||
totalReplies: number;
|
||||
insertedAt?: Date | string;
|
||||
publishedAt?: Date | string;
|
||||
}
|
||||
|
||||
export class CommentModel implements IComment {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user