fix: at while replying

This commit is contained in:
Tristan Yang
2022-12-06 10:23:13 +08:00
parent 0f3e01a922
commit 0c4a7a7f88
2 changed files with 8 additions and 4 deletions
+6 -3
View File
@@ -149,11 +149,14 @@ export const messageApi = createApi({
}),
replyMessage: builder.mutation<
number,
{ reply_mid: number; content: string; type: ContentTypeKey }
{ from_uid: number, reply_mid: number; content: string; type: ContentTypeKey, properties?: {} }
>({
query: ({ reply_mid, content, type = "text" }) => ({
query: ({ reply_mid, content, type = "text", properties }) => ({
headers: {
"content-type": ContentTypes[type]
"content-type": ContentTypes[type],
"X-Properties": properties
? btoa(unescape(encodeURIComponent(JSON.stringify(properties))))
: ""
},
url: `/message/${reply_mid}/reply`,
method: "POST",
+2 -1
View File
@@ -71,7 +71,8 @@ const useSendMessage = (props?: Props) => {
from_uid: from,
reply_mid,
type,
content
content,
properties
});
} else {
await sendFn({