1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 18:32:34 +01:00

temporary placeholder for other message types

This commit is contained in:
Puyodead1 2023-08-25 22:51:33 -04:00
parent a3a3135e2c
commit 8b908f9bf0
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,4 @@
import { MessageType } from "@spacebarchat/spacebar-api-types/v9";
import React from "react";
import Moment from "react-moment";
import styled from "styled-components";
@ -141,9 +142,13 @@ function Message({ message, isHeader, isSending, isFailed }: Props) {
</MessageHeader>
)}
{message.type === MessageType.Default ? (
<MessageContent sending={isSending} failed={isFailed}>
{message.content}
</MessageContent>
) : (
<div style={{ color: "var(--text-secondary)" }}>MessageType: {MessageType[message.type]}</div>
)}
</MessageContentContainer>
</Container>
</MessageListItem>

View File

@ -1,4 +1,5 @@
import type { APIMessage } from "@spacebarchat/spacebar-api-types/v9";
import { MessageType } from "@spacebarchat/spacebar-api-types/v9";
import { action, computed, makeAutoObservable, observable } from "mobx";
import type { IObservableArray } from "mobx";
@ -25,6 +26,7 @@ export interface QueuedMessage {
author: User;
content: string;
timestamp: Date;
type: MessageType;
}
export default class MessageQueue {
@ -42,6 +44,7 @@ export default class MessageQueue {
...data,
timestamp: new Date(),
status: QueuedMessageStatus.SENDING,
type: MessageType.Default,
});
}