mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-14 16:15:18 +00:00
Attachment -> PublicAttachment in schemas
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Attachment, Sticker } from "@spacebar/util";
|
||||
import { Sticker } from "@spacebar/util";
|
||||
import { Embed, MessageActivity, MessageComponent, PartialUser, Poll, PublicChannel, Snowflake } from "@spacebar/schemas";
|
||||
import { PublicAttachment } from "./Attachments";
|
||||
|
||||
@@ -151,7 +151,7 @@ export interface MessageSnapshot {
|
||||
edited_timestamp?: Date | null;
|
||||
mentions: PartialUser[];
|
||||
mention_roles: Snowflake[];
|
||||
attachments?: Attachment[];
|
||||
attachments?: PublicAttachment[];
|
||||
embeds: Embed[];
|
||||
type: MessageType;
|
||||
flags: number;
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// TODO: remove dependency on entities...
|
||||
import { Attachment } from "@spacebar/util";
|
||||
import { PublicAttachment } from "../api/messages/Attachments";
|
||||
|
||||
export enum AccountStandingState {
|
||||
ALL_GOOD = 100,
|
||||
@@ -114,7 +113,7 @@ export interface FlaggedContent {
|
||||
type: "message";
|
||||
id: string;
|
||||
content: string;
|
||||
attachments: Attachment[];
|
||||
attachments: PublicAttachment[];
|
||||
}
|
||||
|
||||
export interface Classification {
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
*/
|
||||
|
||||
// TODO: remove dependency on entities
|
||||
import { Attachment, Role } from "@spacebar/util";
|
||||
import { Role } from "@spacebar/util";
|
||||
import { BaseMessageComponents, Embed, MessageType, Poll, PublicUser } from "@spacebar/schemas";
|
||||
import { PublicAttachment } from "../api/messages/Attachments";
|
||||
|
||||
export interface GuildMessagesSearchMessage {
|
||||
id: string;
|
||||
@@ -26,7 +27,7 @@ export interface GuildMessagesSearchMessage {
|
||||
content?: string;
|
||||
channel_id: string;
|
||||
author: PublicUser;
|
||||
attachments: Attachment[];
|
||||
attachments: PublicAttachment[];
|
||||
embeds: Embed[];
|
||||
mentions: PublicUser[];
|
||||
mention_roles: Role[];
|
||||
|
||||
@@ -331,7 +331,7 @@ export class Message extends BaseClass {
|
||||
toSnapshot(): MessageSnapshot {
|
||||
return {
|
||||
message: {
|
||||
attachments: this.attachments,
|
||||
attachments: this.attachments?.map((x) => x.toJSON()),
|
||||
components: this.components,
|
||||
content: this.content!,
|
||||
edited_timestamp: this.edited_timestamp,
|
||||
|
||||
Reference in New Issue
Block a user