@openclaw/msteams 2026.9.1 → 2026.9.3
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/dist/api.cjs +2 -2
- package/dist/{approval-card-ClrTjCsL.cjs → approval-card-CPNH_q3P.cjs} +7 -85
- package/dist/{approval-handler.runtime-9rMFhyLp.cjs → approval-handler.runtime-CoTQG4FS.cjs} +6 -6
- package/dist/{channel-CqRcu6kk.cjs → channel-Cdm6-HsU.cjs} +4 -4
- package/dist/channel-config-api.cjs +1 -1
- package/dist/channel-plugin-api.cjs +1 -1
- package/dist/{channel.runtime-BAy59d1L.cjs → channel.runtime-__5ZQlfG.cjs} +5 -5
- package/dist/{channel.setup-D2YO3F4O.cjs → channel.setup-ChwkwdLk.cjs} +5 -2
- package/dist/{config-schema-MyN2lamA.cjs → config-schema-D22Lr1Qk.cjs} +4 -13
- package/dist/doctor-contract-api.cjs +7 -7
- package/dist/{messenger-BvR2flEt.cjs → messenger-DbWgzI01.cjs} +50 -55
- package/dist/{polls-P86qBpeV.cjs → polls-BBdZPx_R.cjs} +9 -15
- package/dist/{reaction-types-DcJBoyFP.cjs → reaction-types-zP91Ncwk.cjs} +16 -15
- package/dist/{send-CAKTR80N.cjs → send-Bw4W8RO7.cjs} +10 -9
- package/dist/setup-plugin-api.cjs +1 -1
- package/dist/{src-CyNCea9B.cjs → src-B--Qc6lj.cjs} +152 -172
- package/dist/{sso-token-store-CNbRhz-A.cjs → sso-token-store-DTeYxubp.cjs} +1 -1
- package/openclaw.plugin.json +18 -2
- package/package.json +5 -5
|
@@ -69,12 +69,8 @@ async function fetchThreadReplies(token, groupId, channelId, messageId, limit =
|
|
|
69
69
|
...deadline ? { deadline } : {}
|
|
70
70
|
})).value ?? [];
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
* Skips the current message (by id) and blank messages.
|
|
75
|
-
*/
|
|
76
|
-
function formatThreadContext(messages, currentMessageId) {
|
|
77
|
-
const lines = [];
|
|
72
|
+
function buildThreadContext(messages, currentMessageId) {
|
|
73
|
+
const context = [];
|
|
78
74
|
for (const msg of messages) {
|
|
79
75
|
if (msg.id && msg.id === currentMessageId) continue;
|
|
80
76
|
const sender = msg.from?.user?.displayName ?? msg.from?.application?.displayName ?? "unknown";
|
|
@@ -82,9 +78,13 @@ function formatThreadContext(messages, currentMessageId) {
|
|
|
82
78
|
const rawContent = msg.body?.content ?? "";
|
|
83
79
|
const content = contentType === "html" ? stripHtmlFromTeamsMessage(rawContent) : rawContent.trim();
|
|
84
80
|
if (!content) continue;
|
|
85
|
-
|
|
81
|
+
context.push({
|
|
82
|
+
message_id: msg.id,
|
|
83
|
+
sender,
|
|
84
|
+
body: content
|
|
85
|
+
});
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return context;
|
|
88
88
|
}
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region extensions/msteams/src/reaction-types.ts
|
|
@@ -98,7 +98,8 @@ const TEAMS_REACTION_EMOJI = {
|
|
|
98
98
|
};
|
|
99
99
|
const TEAMS_REACTION_TYPES = Object.keys(TEAMS_REACTION_EMOJI);
|
|
100
100
|
function getMSTeamsReactionEmoji(raw) {
|
|
101
|
-
|
|
101
|
+
const key = raw.trim().toLowerCase();
|
|
102
|
+
return Object.hasOwn(TEAMS_REACTION_EMOJI, key) ? TEAMS_REACTION_EMOJI[key] : void 0;
|
|
102
103
|
}
|
|
103
104
|
function resolveMSTeamsReactionEmoji(raw) {
|
|
104
105
|
const normalized = raw.trim();
|
|
@@ -106,6 +107,12 @@ function resolveMSTeamsReactionEmoji(raw) {
|
|
|
106
107
|
return getMSTeamsReactionEmoji(normalized) ?? normalized;
|
|
107
108
|
}
|
|
108
109
|
//#endregion
|
|
110
|
+
Object.defineProperty(exports, "buildThreadContext", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function() {
|
|
113
|
+
return buildThreadContext;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
109
116
|
Object.defineProperty(exports, "fetchChannelMessage", {
|
|
110
117
|
enumerable: true,
|
|
111
118
|
get: function() {
|
|
@@ -124,12 +131,6 @@ Object.defineProperty(exports, "fetchThreadReplies", {
|
|
|
124
131
|
return fetchThreadReplies;
|
|
125
132
|
}
|
|
126
133
|
});
|
|
127
|
-
Object.defineProperty(exports, "formatThreadContext", {
|
|
128
|
-
enumerable: true,
|
|
129
|
-
get: function() {
|
|
130
|
-
return formatThreadContext;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
134
|
Object.defineProperty(exports, "getMSTeamsReactionEmoji", {
|
|
134
135
|
enumerable: true,
|
|
135
136
|
get: function() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_runtime = require("./runtime-gZTAuFux.cjs");
|
|
2
2
|
require("./runtime-api.cjs");
|
|
3
3
|
const require_resolve_allowlist = require("./resolve-allowlist-CoKmLXYe.cjs");
|
|
4
|
-
const require_channel = require("./channel-
|
|
5
|
-
const require_channel_setup = require("./channel.setup-
|
|
6
|
-
const require_polls = require("./polls-
|
|
7
|
-
const require_messenger = require("./messenger-
|
|
4
|
+
const require_channel = require("./channel-Cdm6-HsU.cjs");
|
|
5
|
+
const require_channel_setup = require("./channel.setup-ChwkwdLk.cjs");
|
|
6
|
+
const require_polls = require("./polls-BBdZPx_R.cjs");
|
|
7
|
+
const require_messenger = require("./messenger-DbWgzI01.cjs");
|
|
8
8
|
let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
|
|
9
9
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
10
10
|
let openclaw_plugin_sdk_markdown_table_runtime = require("openclaw/plugin-sdk/markdown-table-runtime");
|
|
@@ -349,8 +349,7 @@ async function sendMessageMSTeams(params) {
|
|
|
349
349
|
const messageId = await sendProactiveActivityRaw({
|
|
350
350
|
ctx,
|
|
351
351
|
activity: {
|
|
352
|
-
|
|
353
|
-
text: messageText || void 0,
|
|
352
|
+
...require_messenger.buildMSTeamsMessageActivity(messageText || void 0),
|
|
354
353
|
attachments: [fileCardAttachment]
|
|
355
354
|
}
|
|
356
355
|
});
|
|
@@ -523,9 +522,11 @@ async function editMessageMSTeams(params) {
|
|
|
523
522
|
return updateMSTeamsMessageActivity({
|
|
524
523
|
...params,
|
|
525
524
|
activity: {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
525
|
+
...require_messenger.buildMSTeamsMessageActivity(require_messenger.formatMSTeamsMarkdown(params.text, (0, openclaw_plugin_sdk_markdown_table_runtime.resolveMarkdownTableMode)({
|
|
526
|
+
cfg: params.cfg,
|
|
527
|
+
channel: "msteams"
|
|
528
|
+
}))),
|
|
529
|
+
id: params.activityId
|
|
529
530
|
}
|
|
530
531
|
});
|
|
531
532
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_channel_setup = require("./channel.setup-
|
|
2
|
+
const require_channel_setup = require("./channel.setup-ChwkwdLk.cjs");
|
|
3
3
|
exports.msteamsSetupPlugin = require_channel_setup.msteamsSetupPlugin;
|