chore: content types
This commit is contained in:
@@ -165,7 +165,7 @@ export const channelApi = createApi({
|
||||
number,
|
||||
{
|
||||
id: number;
|
||||
content: string | object;
|
||||
content: string | { path: string };
|
||||
type: ContentTypeKey;
|
||||
properties?: object;
|
||||
from_uid?: number;
|
||||
|
||||
@@ -215,7 +215,7 @@ export const messageApi = createApi({
|
||||
{
|
||||
from_uid: number;
|
||||
reply_mid: number;
|
||||
content: string;
|
||||
content: string | { path: string };
|
||||
type: ContentTypeKey;
|
||||
properties?: {};
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ export const userApi = createApi({
|
||||
}),
|
||||
sendMsg: builder.mutation<
|
||||
number,
|
||||
{ id: number; content: string; type: ContentTypeKey; properties?: object }
|
||||
{ id: number; content: string | { path: string }; type: ContentTypeKey; properties?: object }
|
||||
>({
|
||||
query: ({ id, content, type = "text", properties = "" }) => ({
|
||||
headers: {
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@ interface UserCallEvent {
|
||||
}
|
||||
interface MessageClearedEvent {
|
||||
type: "message_cleared";
|
||||
mid: number;
|
||||
latest_deleted_mid: number;
|
||||
}
|
||||
|
||||
export type ServerEvent =
|
||||
|
||||
@@ -65,7 +65,7 @@ const MessageFeed = ({ hostId }: Props) => {
|
||||
key={mid}
|
||||
mid={mid}
|
||||
type="text"
|
||||
content={content}
|
||||
content={content as string}
|
||||
create_time={created_at}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user