mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 18:14:31 +00:00
fix(slack): use SLACK_USER_TOKEN when connecting to Slack (#28103)
* fix(slack): use SLACK_USER_TOKEN when connecting to Slack (closes #26480) * test(slack): fix account fixture typing for user token source --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,7 @@ describe("channelsCapabilitiesCommand", () => {
|
||||
account: {
|
||||
accountId: "default",
|
||||
botToken: "xoxb-bot",
|
||||
userToken: "xoxp-user",
|
||||
config: { userToken: "xoxp-user" },
|
||||
},
|
||||
probe: { ok: true, bot: { name: "openclaw" }, team: { name: "team" } },
|
||||
|
||||
@@ -381,9 +381,7 @@ async function resolveChannelReports(params: {
|
||||
let slackScopes: ChannelCapabilitiesReport["slackScopes"];
|
||||
if (plugin.id === "slack" && configured && enabled) {
|
||||
const botToken = (resolvedAccount as { botToken?: string }).botToken?.trim();
|
||||
const userToken = (
|
||||
resolvedAccount as { config?: { userToken?: string } }
|
||||
).config?.userToken?.trim();
|
||||
const userToken = (resolvedAccount as { userToken?: string }).userToken?.trim();
|
||||
const scopeReports: NonNullable<ChannelCapabilitiesReport["slackScopes"]> = [];
|
||||
if (botToken) {
|
||||
scopeReports.push({
|
||||
|
||||
Reference in New Issue
Block a user