fix: add auth property to registerPluginHttpRoute, fix fetchMattermostUserTeams call signature

This commit is contained in:
Tony Dehnke
2026-03-05 11:00:11 +00:00
committed by Muhammed Mukhthar CM
parent 56b7383bf3
commit 6bc51f1e34
2 changed files with 3 additions and 1 deletions

View File

@@ -459,6 +459,7 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}
const unregisterInteractions = registerPluginHttpRoute({
path: interactionPath,
fallbackPath: "/mattermost/interactions/default",
auth: "plugin",
handler: createMattermostInteractionHandler({
client,
botUserId,

View File

@@ -158,7 +158,8 @@ async function resolveChannelIdByName(params: {
return cached;
}
const client = createMattermostClient({ baseUrl, botToken: token });
const teams = await fetchMattermostUserTeams(client);
const me = await fetchMattermostMe(client);
const teams = await fetchMattermostUserTeams(client, me.id);
for (const team of teams) {
try {
const channel = await fetchMattermostChannelByName(client, team.id, name);