This commit is contained in:
parent
b63f9f4530
commit
c9a728895a
@ -15,6 +15,7 @@ class LarkMessageService extends LarkBaseService {
|
|||||||
msgType: Lark.MsgType,
|
msgType: Lark.MsgType,
|
||||||
content: string | Record<string, any>
|
content: string | Record<string, any>
|
||||||
) {
|
) {
|
||||||
|
if (!content) return { code: 1, message: "content is required" }
|
||||||
const path = `/im/v1/messages?receive_id_type=${receiveIdType}`
|
const path = `/im/v1/messages?receive_id_type=${receiveIdType}`
|
||||||
if (typeof content === "object") {
|
if (typeof content === "object") {
|
||||||
content = JSON.stringify(content)
|
content = JSON.stringify(content)
|
||||||
@ -60,6 +61,7 @@ class LarkMessageService extends LarkBaseService {
|
|||||||
content: string | Record<string, any>,
|
content: string | Record<string, any>,
|
||||||
isText: boolean = false
|
isText: boolean = false
|
||||||
) {
|
) {
|
||||||
|
if (!content) return { code: 1, message: "content is required" }
|
||||||
const path = `/im/v1/messages/${messageId}`
|
const path = `/im/v1/messages/${messageId}`
|
||||||
if (typeof content === "object") {
|
if (typeof content === "object") {
|
||||||
content = JSON.stringify(content)
|
content = JSON.stringify(content)
|
||||||
@ -117,6 +119,7 @@ class LarkMessageService extends LarkBaseService {
|
|||||||
msgType: Lark.MsgType,
|
msgType: Lark.MsgType,
|
||||||
content: string | Record<string, any>
|
content: string | Record<string, any>
|
||||||
) {
|
) {
|
||||||
|
if (!content) return { code: 1, message: "content is required" }
|
||||||
const path = `/im/v1/messages/${messageId}/reply`
|
const path = `/im/v1/messages/${messageId}/reply`
|
||||||
if (typeof content === "object") {
|
if (typeof content === "object") {
|
||||||
content = JSON.stringify(content)
|
content = JSON.stringify(content)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user