underbbs/frontend/ts/message.ts

36 lines
970 B
TypeScript
Raw Normal View History

2024-04-28 18:16:23 +00:00
export class Message {
public id: string = "";
public uri: string = "";
2024-04-28 18:16:23 +00:00
public protocol: string = "";
public adapter: string = "";
public author: string = ""
2024-04-28 18:16:23 +00:00
public content: string = "";
public attachments: Attachment[] = [];
public replyTo: string | null = null;
public replies: string[] = [];
public mentions: string[] = [];
public created: number = 0;
public edited: number | null = null;
2024-04-28 18:16:23 +00:00
public visibility: string = "public";
2024-08-31 17:01:31 +00:00
public renoteId: string | null = null;
2024-04-28 18:16:23 +00:00
}
export class Author {
public id: string = "";
public uri: string = "";
public protocol: string = "";
public adapter: string = "";
2024-04-28 18:16:23 +00:00
public name: string = "";
public profileData: any = {};
public profilePic: string = "";
public messages: string[] = [];
2024-04-28 18:16:23 +00:00
}
export class Attachment {
public Src: string = "";
public ThumbSrc: string = "";
public Desc: string = "";
public CreatedAt: Date = new Date();
2024-04-28 18:16:23 +00:00
}
export default { Message, Attachment, Author }