Spaces:
Sleeping
Sleeping
debug1
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ from slack_bolt.oauth.async_oauth_settings import AsyncOAuthSettings
|
|
| 17 |
from slack_sdk.oauth.installation_store.async_installation_store import AsyncInstallationStore
|
| 18 |
from slack_sdk.oauth import AuthorizeUrlGenerator
|
| 19 |
from slack_sdk.oauth.installation_store.models import Installation
|
| 20 |
-
from slack_bolt.authorization import
|
| 21 |
|
| 22 |
# RAG/ML Libraries
|
| 23 |
from sentence_transformers import SentenceTransformer
|
|
@@ -141,7 +141,7 @@ async def async_authorize(enterprise_id, team_id, user_id):
|
|
| 141 |
return None # Single-team doesn't need this
|
| 142 |
installation = await installation_store.fetch_installation(team_id=team_id, enterprise_id=enterprise_id)
|
| 143 |
if installation:
|
| 144 |
-
return
|
| 145 |
enterprise_id=enterprise_id or installation.enterprise_id,
|
| 146 |
team_id=team_id,
|
| 147 |
user_id=user_id or installation.user_id,
|
|
|
|
| 17 |
from slack_sdk.oauth.installation_store.async_installation_store import AsyncInstallationStore
|
| 18 |
from slack_sdk.oauth import AuthorizeUrlGenerator
|
| 19 |
from slack_sdk.oauth.installation_store.models import Installation
|
| 20 |
+
from slack_bolt.authorization import AuthorizeResult # Fixed: Use AuthorizeResult instead of AsyncAuthorizeResult
|
| 21 |
|
| 22 |
# RAG/ML Libraries
|
| 23 |
from sentence_transformers import SentenceTransformer
|
|
|
|
| 141 |
return None # Single-team doesn't need this
|
| 142 |
installation = await installation_store.fetch_installation(team_id=team_id, enterprise_id=enterprise_id)
|
| 143 |
if installation:
|
| 144 |
+
return AuthorizeResult( # Fixed: Use AuthorizeResult
|
| 145 |
enterprise_id=enterprise_id or installation.enterprise_id,
|
| 146 |
team_id=team_id,
|
| 147 |
user_id=user_id or installation.user_id,
|