mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor: simplify Slack client initialization by directly passing the token
This commit is contained in:
parent
024a683b4f
commit
3c5bf6c83c
1 changed files with 2 additions and 8 deletions
|
|
@ -582,14 +582,8 @@ async def get_slack_channels(
|
||||||
# Import SlackHistory here to avoid circular imports
|
# Import SlackHistory here to avoid circular imports
|
||||||
from app.connectors.slack_history import SlackHistory
|
from app.connectors.slack_history import SlackHistory
|
||||||
|
|
||||||
# Create Slack client and fetch channels
|
# Create Slack client with direct token (simple pattern for quick operations)
|
||||||
slack_client = SlackHistory(
|
slack_client = SlackHistory(token=bot_token)
|
||||||
session=session,
|
|
||||||
connector_id=connector_id,
|
|
||||||
credentials=credentials,
|
|
||||||
)
|
|
||||||
# Set the decrypted token directly
|
|
||||||
slack_client.set_token(bot_token)
|
|
||||||
|
|
||||||
channels = await slack_client.get_all_channels(include_private=True)
|
channels = await slack_client.get_all_channels(include_private=True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue