@openclaw/mattermost 2026.8.1-beta.2 → 2026.9.1-beta.1
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.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-plugin-runtime-Dxt8Zv1j.js → channel-plugin-runtime-Bh8hcegp.js} +106 -133
- package/dist/channel-plugin-runtime.js +1 -1
- package/dist/{channel.runtime-FKnzxYBR.js → channel.runtime-DLTjcasQ.js} +97 -98
- package/dist/{client-B_hd-kwM.js → client-DAIry9-2.js} +1 -14
- package/dist/{interactions-Du_EJMeN.js → interactions-k47k-7SP.js} +1 -1
- package/dist/{accounts-DspH-NMT.js → normalize-bBDFEiyJ.js} +68 -3
- package/dist/slash-route-api.js +1 -1
- package/dist/{slash-state-DUowGLl4.js → slash-state-CfsJU7WW.js} +35 -95
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +10 -0
- package/package.json +5 -5
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as isMattermostSenderAllowed } from "./monitor-auth-CVd_4FPD.js";
|
|
2
|
-
import { t as buildButtonAttachments } from "./interactions-
|
|
2
|
+
import { t as buildButtonAttachments } from "./interactions-k47k-7SP.js";
|
|
3
3
|
export { buildButtonAttachments, isMattermostSenderAllowed };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as describeMattermostAccount, c as mattermostMeta, i as MattermostChannelConfigSchema, n as mattermostSetupWizard, o as isMattermostConfigured, r as mattermostSetupContract, s as mattermostConfigAdapter, t as mattermostPlugin } from "./channel-plugin-runtime-Bh8hcegp.js";
|
|
2
2
|
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.js";
|
|
3
3
|
//#region extensions/mattermost/src/channel.setup.ts
|
|
4
4
|
const mattermostSetupPlugin = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as normalizeMattermostBaseUrl } from "./client-
|
|
2
|
-
import { a as
|
|
1
|
+
import { m as normalizeMattermostBaseUrl } from "./client-DAIry9-2.js";
|
|
2
|
+
import { a as inspectMattermostAccount, c as resolveMattermostAccount, d as hasConfiguredSecretInput, i as resolveMattermostPresentation, l as resolveMattermostReplyToMode, n as normalizeMattermostMessagingTarget, o as listMattermostAccountIds, r as requiresMattermostMediaUpload, s as resolveDefaultMattermostAccountId, t as looksLikeMattermostTargetId, u as buildSecretInputSchema } from "./normalize-bBDFEiyJ.js";
|
|
3
3
|
import { t as resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass-B93t91oq.js";
|
|
4
4
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-mvORF4f6.js";
|
|
5
5
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-qg3NXRlS.js";
|
|
@@ -11,13 +11,13 @@ import { z } from "zod";
|
|
|
11
11
|
import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
12
12
|
import { createLoggedPairingApprovalNotifier } from "openclaw/plugin-sdk/channel-pairing";
|
|
13
13
|
import { createAccountStatusSink, createChannelMessageAdapterFromOutbound } from "openclaw/plugin-sdk/channel-outbound";
|
|
14
|
-
import { jsonResult, readPositiveIntegerParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
14
|
+
import { jsonResult, readPositiveIntegerParam, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
15
15
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
16
16
|
import { createChannelConfigUiHints, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
17
17
|
import { buildChannelGroupsScopeTree, buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector, createRestrictSendersChannelSecurity, resolveScopeRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
18
18
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
19
19
|
import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
20
|
-
import {
|
|
20
|
+
import { resolveMessagePresentationButtonAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
21
21
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
22
22
|
import { resolvePayloadMediaUrls, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
23
23
|
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -198,6 +198,7 @@ const MattermostChannelConfigSchema = buildChannelConfigSchema(buildMultiAccount
|
|
|
198
198
|
markdown: MarkdownConfigSchema,
|
|
199
199
|
enabled: z.boolean().optional(),
|
|
200
200
|
configWrites: z.boolean().optional(),
|
|
201
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
201
202
|
botToken: buildSecretInputSchema().optional(),
|
|
202
203
|
baseUrl: z.string().optional(),
|
|
203
204
|
chatmode: z.enum([
|
|
@@ -285,39 +286,59 @@ function resolveMattermostGroupRequireMention(params) {
|
|
|
285
286
|
});
|
|
286
287
|
}
|
|
287
288
|
//#endregion
|
|
288
|
-
//#region extensions/mattermost/src/
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
289
|
+
//#region extensions/mattermost/src/mattermost/emoji.ts
|
|
290
|
+
const MATTERMOST_EMOJI_SHORTNAME_BY_GLYPH = {
|
|
291
|
+
"✅": "white_check_mark",
|
|
292
|
+
"❌": "x",
|
|
293
|
+
"👍": "thumbsup",
|
|
294
|
+
"👎": "thumbsdown",
|
|
295
|
+
"🎉": "tada",
|
|
296
|
+
"❤": "heart",
|
|
297
|
+
"😄": "smile",
|
|
298
|
+
"😂": "joy",
|
|
299
|
+
"🚀": "rocket",
|
|
300
|
+
"👀": "eyes",
|
|
301
|
+
"🙏": "pray",
|
|
302
|
+
"🔥": "fire",
|
|
303
|
+
"💯": "100",
|
|
304
|
+
"⚠": "warning",
|
|
305
|
+
"➕": "heavy_plus_sign",
|
|
306
|
+
"➖": "heavy_minus_sign",
|
|
307
|
+
"🤔": "thinking_face",
|
|
308
|
+
"⚡": "zap",
|
|
309
|
+
"🌐": "globe_with_meridians",
|
|
310
|
+
"😱": "scream",
|
|
311
|
+
"🧠": "brain",
|
|
312
|
+
"💻": "computer",
|
|
313
|
+
"👋": "wave",
|
|
314
|
+
"🙌": "raised_hands"
|
|
315
|
+
};
|
|
316
|
+
const MATTERMOST_EMOJI_TONE_CAPABLE_NAMES = /* @__PURE__ */ new Set([
|
|
317
|
+
"thumbsup",
|
|
318
|
+
"thumbsdown",
|
|
319
|
+
"pray",
|
|
320
|
+
"wave",
|
|
321
|
+
"raised_hands"
|
|
322
|
+
]);
|
|
323
|
+
const MATTERMOST_EMOJI_TONE_SUFFIX_BY_MODIFIER = /* @__PURE__ */ new Map([
|
|
324
|
+
["🏻", "light_skin_tone"],
|
|
325
|
+
["🏼", "medium_light_skin_tone"],
|
|
326
|
+
["🏽", "medium_skin_tone"],
|
|
327
|
+
["🏾", "medium_dark_skin_tone"],
|
|
328
|
+
["🏿", "dark_skin_tone"]
|
|
329
|
+
]);
|
|
330
|
+
const EMOJI_SKIN_TONE_MODIFIER_RE = /[\u{1F3FB}-\u{1F3FF}]/gu;
|
|
331
|
+
const EMOJI_VARIATION_SELECTOR_RE = /[\u{FE00}-\u{FE0F}]/gu;
|
|
332
|
+
function normalizeMattermostEmojiName(raw) {
|
|
333
|
+
const withoutColons = raw?.trim().replace(/^:+|:+$/g, "");
|
|
334
|
+
if (!withoutColons) return;
|
|
335
|
+
const toneModifier = withoutColons.match(EMOJI_SKIN_TONE_MODIFIER_RE)?.[0];
|
|
336
|
+
const glyphKey = withoutColons.replace(EMOJI_SKIN_TONE_MODIFIER_RE, "").replace(EMOJI_VARIATION_SELECTOR_RE, "");
|
|
337
|
+
const shortname = Object.hasOwn(MATTERMOST_EMOJI_SHORTNAME_BY_GLYPH, glyphKey) ? MATTERMOST_EMOJI_SHORTNAME_BY_GLYPH[glyphKey] : void 0;
|
|
338
|
+
if (shortname === void 0) return withoutColons;
|
|
339
|
+
const toneSuffix = toneModifier ? MATTERMOST_EMOJI_TONE_SUFFIX_BY_MODIFIER.get(toneModifier) : void 0;
|
|
340
|
+
if (!toneSuffix || !MATTERMOST_EMOJI_TONE_CAPABLE_NAMES.has(shortname)) return shortname;
|
|
341
|
+
return `${shortname}_${toneSuffix}`;
|
|
321
342
|
}
|
|
322
343
|
//#endregion
|
|
323
344
|
//#region extensions/mattermost/src/session-route.ts
|
|
@@ -559,20 +580,7 @@ const mattermostSetupWizard = {
|
|
|
559
580
|
};
|
|
560
581
|
//#endregion
|
|
561
582
|
//#region extensions/mattermost/src/channel.ts
|
|
562
|
-
const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
563
|
-
function buildMattermostPresentationButtons(presentation) {
|
|
564
|
-
return presentation.blocks.filter((block) => block.type === "buttons").map((block) => block.buttons.flatMap((button) => {
|
|
565
|
-
if (button.action) return [];
|
|
566
|
-
const value = resolveMessagePresentationControlValue(button);
|
|
567
|
-
return value ? [{
|
|
568
|
-
id: value,
|
|
569
|
-
text: button.label,
|
|
570
|
-
callback_data: value,
|
|
571
|
-
context: { callback_data: value },
|
|
572
|
-
style: button.style
|
|
573
|
-
}] : [];
|
|
574
|
-
})).filter((row) => row.length > 0);
|
|
575
|
-
}
|
|
583
|
+
const loadMattermostChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-DLTjcasQ.js"));
|
|
576
584
|
const MATTERMOST_PRESENTATION_CAPABILITIES = {
|
|
577
585
|
supported: true,
|
|
578
586
|
buttons: true,
|
|
@@ -604,6 +612,7 @@ const mattermostSecurityAdapter = createRestrictSendersChannelSecurity({
|
|
|
604
612
|
openScope: "any member",
|
|
605
613
|
groupPolicyPath: "channels.mattermost.groupPolicy",
|
|
606
614
|
groupAllowFromPath: "channels.mattermost.groupAllowFrom",
|
|
615
|
+
findingTitle: "Mattermost security warning",
|
|
607
616
|
policyPathSuffix: "dmPolicy",
|
|
608
617
|
normalizeDmEntry: (raw) => normalizeMattermostAllowEntry(raw)
|
|
609
618
|
});
|
|
@@ -723,6 +732,7 @@ async function listMattermostDirectoryPeers(params) {
|
|
|
723
732
|
return (await loadMattermostChannelRuntime()).listMattermostDirectoryPeers(params);
|
|
724
733
|
}
|
|
725
734
|
const mattermostMessageActions = {
|
|
735
|
+
providerOwnedReadGates: ["read"],
|
|
726
736
|
describeMessageTool: describeMattermostMessageTool,
|
|
727
737
|
extractToolSend: ({ args }) => extractMattermostToolSend(args),
|
|
728
738
|
extractToolSendResult: ({ result, send }) => extractMattermostToolSendResult(result, send),
|
|
@@ -836,15 +846,13 @@ const mattermostMessageActions = {
|
|
|
836
846
|
if (action !== "send") throw new Error(`Unsupported Mattermost action: ${action}`);
|
|
837
847
|
const to = typeof params.to === "string" ? params.to.trim() : typeof params.target === "string" ? params.target.trim() : "";
|
|
838
848
|
if (!to) throw new Error("Mattermost send requires a target (to).");
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
}) : typeof params.message === "string" ? params.message : "";
|
|
849
|
+
const { text: message, buttons } = resolveMattermostPresentation({
|
|
850
|
+
text: typeof params.message === "string" ? params.message : void 0,
|
|
851
|
+
presentation: params.presentation
|
|
852
|
+
});
|
|
844
853
|
const replyToId = normalizeOptionalString(params.replyToId) ?? normalizeOptionalString(params.threadId) ?? normalizeOptionalString(params.replyTo);
|
|
845
854
|
const resolvedAccountId = accountId || void 0;
|
|
846
855
|
const mediaUrl = resolveMattermostSendAttachmentMedia(params);
|
|
847
|
-
const buttons = presentation ? buildMattermostPresentationButtons(presentation) : [];
|
|
848
856
|
const result = await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, message, {
|
|
849
857
|
cfg,
|
|
850
858
|
accountId: resolvedAccountId,
|
|
@@ -877,7 +885,7 @@ const mattermostMessageActions = {
|
|
|
877
885
|
function parseMattermostReactActionParams(params) {
|
|
878
886
|
const postId = normalizeOptionalString(params.messageId) ?? normalizeOptionalString(params.postId);
|
|
879
887
|
if (!postId) throw new Error("Mattermost react requires messageId (post id)");
|
|
880
|
-
const emojiName = normalizeOptionalString(params.emoji)
|
|
888
|
+
const emojiName = normalizeMattermostEmojiName(normalizeOptionalString(params.emoji));
|
|
881
889
|
if (!emojiName) throw new Error("Mattermost react requires emoji");
|
|
882
890
|
return {
|
|
883
891
|
postId,
|
|
@@ -885,76 +893,42 @@ function parseMattermostReactActionParams(params) {
|
|
|
885
893
|
remove: params.remove === true
|
|
886
894
|
};
|
|
887
895
|
}
|
|
888
|
-
function
|
|
889
|
-
const
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
collected.push(trimmed);
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
return collected;
|
|
899
|
-
}
|
|
900
|
-
function toSnakeCaseKey(key) {
|
|
901
|
-
return key.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
902
|
-
}
|
|
903
|
-
function readMattermostParam(params, key) {
|
|
904
|
-
if (Object.hasOwn(params, key)) return params[key];
|
|
905
|
-
const snakeKey = toSnakeCaseKey(key);
|
|
906
|
-
return snakeKey === key || !Object.hasOwn(params, snakeKey) ? void 0 : params[snakeKey];
|
|
907
|
-
}
|
|
908
|
-
function readMattermostStringParam(params, key) {
|
|
909
|
-
const raw = readMattermostParam(params, key);
|
|
910
|
-
return typeof raw === "string" ? normalizeOptionalString(raw) : void 0;
|
|
911
|
-
}
|
|
912
|
-
function readMattermostStringArrayParam(params, key) {
|
|
913
|
-
const raw = readMattermostParam(params, key);
|
|
914
|
-
if (Array.isArray(raw)) return raw.filter((entry) => typeof entry === "string").flatMap((entry) => {
|
|
915
|
-
const normalized = normalizeOptionalString(entry);
|
|
916
|
-
return normalized ? [normalized] : [];
|
|
917
|
-
});
|
|
918
|
-
if (typeof raw === "string") {
|
|
919
|
-
const normalized = normalizeOptionalString(raw);
|
|
920
|
-
return normalized ? [normalized] : [];
|
|
921
|
-
}
|
|
922
|
-
return [];
|
|
923
|
-
}
|
|
924
|
-
function requiresMattermostMediaUpload(mediaUrl) {
|
|
925
|
-
const normalized = normalizeOptionalString(mediaUrl);
|
|
926
|
-
return Boolean(normalized && !/^https?:\/\//i.test(normalized));
|
|
927
|
-
}
|
|
928
|
-
function collectMattermostAttachmentMedia(params) {
|
|
929
|
-
const mediaUrlCandidates = [
|
|
930
|
-
readMattermostStringParam(params, "media"),
|
|
931
|
-
readMattermostStringParam(params, "mediaUrl"),
|
|
932
|
-
readMattermostStringParam(params, "path"),
|
|
933
|
-
readMattermostStringParam(params, "filePath"),
|
|
934
|
-
readMattermostStringParam(params, "fileUrl")
|
|
896
|
+
function resolveMattermostSendAttachmentMedia(params) {
|
|
897
|
+
const sourceKeys = [
|
|
898
|
+
"media",
|
|
899
|
+
"mediaUrl",
|
|
900
|
+
"path",
|
|
901
|
+
"filePath",
|
|
902
|
+
"fileUrl"
|
|
935
903
|
];
|
|
936
|
-
|
|
937
|
-
|
|
904
|
+
const candidates = sourceKeys.map((key) => readStringParam(params, key));
|
|
905
|
+
candidates.push(...readStringArrayParam(params, "mediaUrls") ?? []);
|
|
906
|
+
let hasUnsupportedAttachmentPayload = Boolean(readStringParam(params, "buffer") ?? readStringParam(params, "base64"));
|
|
938
907
|
if (Array.isArray(params.attachments)) for (const attachment of params.attachments) {
|
|
939
908
|
if (!attachment || typeof attachment !== "object" || Array.isArray(attachment)) continue;
|
|
940
909
|
const record = attachment;
|
|
941
|
-
|
|
942
|
-
|
|
910
|
+
candidates.push(...sourceKeys.map((key) => readStringParam(record, key)));
|
|
911
|
+
candidates.push(readStringParam(record, "url"));
|
|
912
|
+
hasUnsupportedAttachmentPayload ||= Boolean(readStringParam(record, "buffer") ?? readStringParam(record, "base64"));
|
|
943
913
|
}
|
|
914
|
+
if (hasUnsupportedAttachmentPayload) throw new Error("Mattermost send attachments require media, mediaUrl, path, filePath, fileUrl, mediaUrls, or attachments[] with one of those fields; buffer/base64 payloads are not supported.");
|
|
915
|
+
const mediaUrls = [...new Set(candidates.filter((candidate) => Boolean(candidate)))];
|
|
916
|
+
if (mediaUrls.length > 1) throw new Error("Mattermost send supports one attachment per message; split multiple mediaUrls or attachments[] entries into separate sends.");
|
|
917
|
+
return mediaUrls[0];
|
|
918
|
+
}
|
|
919
|
+
function toMattermostOutboundResult(result) {
|
|
920
|
+
const { channelId, ...delivery } = result;
|
|
944
921
|
return {
|
|
945
|
-
|
|
946
|
-
|
|
922
|
+
...delivery,
|
|
923
|
+
target: {
|
|
924
|
+
kind: "channel",
|
|
925
|
+
id: channelId
|
|
926
|
+
}
|
|
947
927
|
};
|
|
948
928
|
}
|
|
949
|
-
function resolveMattermostSendAttachmentMedia(params) {
|
|
950
|
-
const attachmentMedia = collectMattermostAttachmentMedia(params);
|
|
951
|
-
if (attachmentMedia.hasUnsupportedAttachmentPayload) throw new Error("Mattermost send attachments require media, mediaUrl, path, filePath, fileUrl, mediaUrls, or attachments[] with one of those fields; buffer/base64 payloads are not supported.");
|
|
952
|
-
if (attachmentMedia.mediaUrls.length > 1) throw new Error("Mattermost send supports one attachment per message; split multiple mediaUrls or attachments[] entries into separate sends.");
|
|
953
|
-
return attachmentMedia.mediaUrls[0];
|
|
954
|
-
}
|
|
955
929
|
function createMattermostDeliveryProgressReporter(onDeliveryResult) {
|
|
956
930
|
return onDeliveryResult ? async (result) => {
|
|
957
|
-
await onDeliveryResult(attachChannelToResult("mattermost", result));
|
|
931
|
+
await onDeliveryResult(attachChannelToResult("mattermost", toMattermostOutboundResult(result)));
|
|
958
932
|
} : void 0;
|
|
959
933
|
}
|
|
960
934
|
const mattermostOutbound = {
|
|
@@ -974,16 +948,15 @@ const mattermostOutbound = {
|
|
|
974
948
|
presentationCapabilities: MATTERMOST_PRESENTATION_CAPABILITIES,
|
|
975
949
|
renderPresentation: ({ payload, presentation }) => {
|
|
976
950
|
if (payload.mediaUrls && payload.mediaUrls.length > 1) return null;
|
|
977
|
-
const buttons =
|
|
978
|
-
|
|
979
|
-
|
|
951
|
+
const { text, buttons } = resolveMattermostPresentation({
|
|
952
|
+
text: payload.text,
|
|
953
|
+
presentation
|
|
954
|
+
});
|
|
955
|
+
if (!buttons.length && !hasMattermostPresentationNavigation(presentation)) return null;
|
|
980
956
|
return {
|
|
981
957
|
...payload,
|
|
982
|
-
text
|
|
983
|
-
|
|
984
|
-
presentation
|
|
985
|
-
}),
|
|
986
|
-
...hasButtons ? { channelData: {
|
|
958
|
+
text,
|
|
959
|
+
...buttons.length ? { channelData: {
|
|
987
960
|
...payload.channelData,
|
|
988
961
|
mattermost: {
|
|
989
962
|
...payload.channelData?.mattermost,
|
|
@@ -1001,7 +974,7 @@ const mattermostOutbound = {
|
|
|
1001
974
|
...ctx.payload,
|
|
1002
975
|
mediaUrl: ctx.payload.mediaUrl ?? ctx.mediaUrl
|
|
1003
976
|
}).map((url) => url.trim()).find(Boolean);
|
|
1004
|
-
return attachChannelToResult("mattermost", await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, ctx.payload.text ?? ctx.text, {
|
|
977
|
+
return attachChannelToResult("mattermost", toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(ctx.to, ctx.payload.text ?? ctx.text, {
|
|
1005
978
|
cfg: ctx.cfg,
|
|
1006
979
|
accountId: ctx.accountId ?? void 0,
|
|
1007
980
|
mediaUrl,
|
|
@@ -1013,7 +986,7 @@ const mattermostOutbound = {
|
|
|
1013
986
|
buttons: buttons?.length ? buttons : void 0,
|
|
1014
987
|
attachmentText,
|
|
1015
988
|
onDeliveryResult: createMattermostDeliveryProgressReporter(ctx.onDeliveryResult)
|
|
1016
|
-
}));
|
|
989
|
+
})));
|
|
1017
990
|
}
|
|
1018
991
|
return await sendTextMediaPayload({
|
|
1019
992
|
channel: "mattermost",
|
|
@@ -1034,13 +1007,13 @@ const mattermostOutbound = {
|
|
|
1034
1007
|
},
|
|
1035
1008
|
...createAttachedChannelResultAdapter({
|
|
1036
1009
|
channel: "mattermost",
|
|
1037
|
-
sendText: async ({ cfg, to, text, accountId, replyToId, threadId, onDeliveryResult }) => await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, text, {
|
|
1010
|
+
sendText: async ({ cfg, to, text, accountId, replyToId, threadId, onDeliveryResult }) => toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, text, {
|
|
1038
1011
|
cfg,
|
|
1039
1012
|
accountId: accountId ?? void 0,
|
|
1040
1013
|
replyToId: replyToId ?? (threadId != null ? String(threadId) : void 0),
|
|
1041
1014
|
onDeliveryResult: createMattermostDeliveryProgressReporter(onDeliveryResult)
|
|
1042
|
-
}),
|
|
1043
|
-
sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, accountId, replyToId, threadId, onDeliveryResult }) => await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, text, {
|
|
1015
|
+
})),
|
|
1016
|
+
sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, accountId, replyToId, threadId, onDeliveryResult }) => toMattermostOutboundResult(await (await loadMattermostChannelRuntime()).sendMessageMattermost(to, text, {
|
|
1044
1017
|
cfg,
|
|
1045
1018
|
accountId: accountId ?? void 0,
|
|
1046
1019
|
mediaUrl,
|
|
@@ -1050,7 +1023,7 @@ const mattermostOutbound = {
|
|
|
1050
1023
|
requireMediaUpload: requiresMattermostMediaUpload(mediaUrl) ? true : void 0,
|
|
1051
1024
|
replyToId: replyToId ?? (threadId != null ? String(threadId) : void 0),
|
|
1052
1025
|
onDeliveryResult: createMattermostDeliveryProgressReporter(onDeliveryResult)
|
|
1053
|
-
})
|
|
1026
|
+
}))
|
|
1054
1027
|
})
|
|
1055
1028
|
};
|
|
1056
1029
|
const mattermostMessageAdapter = createChannelMessageAdapterFromOutbound({
|
|
@@ -1258,4 +1231,4 @@ const mattermostPlugin = createChatChannelPlugin({
|
|
|
1258
1231
|
outbound: mattermostOutbound
|
|
1259
1232
|
});
|
|
1260
1233
|
//#endregion
|
|
1261
|
-
export {
|
|
1234
|
+
export { describeMattermostAccount as a, mattermostMeta as c, MattermostChannelConfigSchema as i, mattermostSetupWizard as n, isMattermostConfigured$1 as o, mattermostSetupContract as r, mattermostConfigAdapter as s, mattermostPlugin as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mattermostPlugin } from "./channel-plugin-runtime-
|
|
1
|
+
import { t as mattermostPlugin } from "./channel-plugin-runtime-Bh8hcegp.js";
|
|
2
2
|
export { mattermostPlugin };
|