@secret-momo/notifier 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/lib/lark/helper.d.ts +1 -1
- package/lib/lark/helper.js +2 -2
- package/lib/lark/index.d.ts +1 -1
- package/lib/lark/index.js +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { replyCardMessage, replyTextMessage, sendCardMessage, sendErrorCardMessage, sendPostMessage, sendTextMessage, startWsClient, updateCardMessage, uploadImage, webhookSendCardMessage, webhookSendTextMessage } from './lark/index.js';
|
|
2
2
|
export { e, sendMessage } from './telegram/index.js';
|
|
3
|
-
export {
|
|
3
|
+
export { getTextMessageContent } from './lark/helper.js';
|
package/lib/lark/helper.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LarkIMMessageReceiveV1Event } from './types/receive.type';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getTextMessageContent(e: LarkIMMessageReceiveV1Event): string;
|
|
3
3
|
//# sourceMappingURL=helper.d.ts.map
|
package/lib/lark/helper.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function
|
|
1
|
+
function getTextMessageContent(e) {
|
|
2
2
|
if (e.message?.message_type === "text") {
|
|
3
3
|
return JSON.parse(e.message.content ?? "{}").text ?? "";
|
|
4
4
|
}
|
|
5
5
|
return "";
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { getTextMessageContent };
|
package/lib/lark/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Post } from './types/post.type';
|
|
2
2
|
import type { InteractiveCard, InteractiveCardHeader, InteractiveCardBody, InteractiveCardElement, InteractiveCardMarkdownElement, InteractiveCardButtonElement } from './types/card.type';
|
|
3
3
|
import type { LarkIMMessageReceiveV1Event } from './types/receive.type';
|
|
4
|
-
export {
|
|
4
|
+
export { getTextMessageContent } from './helper';
|
|
5
5
|
export type { Post, InteractiveCard, InteractiveCardHeader, InteractiveCardBody, InteractiveCardElement, InteractiveCardMarkdownElement, InteractiveCardButtonElement, LarkIMMessageReceiveV1Event, };
|
|
6
6
|
/**
|
|
7
7
|
* 发送普通文本消息,文档地址:
|
package/lib/lark/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import * as lark from '@larksuiteoapi/node-sdk';
|
|
3
3
|
import { fetchJson } from '@secret-momo/utils';
|
|
4
|
-
export {
|
|
4
|
+
export { getTextMessageContent } from './helper.js';
|
|
5
5
|
|
|
6
6
|
const client = new lark.Client({
|
|
7
7
|
appId: process.env.LARK_APP_ID ?? "",
|