mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-04 11:39:19 +00:00
add relelvant bot suggestions
This commit is contained in:
parent
308b96af8b
commit
d840113bff
2 changed files with 1 additions and 5 deletions
|
@ -5,6 +5,7 @@ Allows fetching emails from Gmail mailbox using Google OAuth credentials.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
import re
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from google.auth.transport.requests import Request
|
from google.auth.transport.requests import Request
|
||||||
|
@ -261,7 +262,6 @@ class GoogleGmailConnector:
|
||||||
"utf-8", errors="ignore"
|
"utf-8", errors="ignore"
|
||||||
)
|
)
|
||||||
# Basic HTML tag removal (you might want to use a proper HTML parser)
|
# Basic HTML tag removal (you might want to use a proper HTML parser)
|
||||||
import re
|
|
||||||
|
|
||||||
text_content = re.sub(r"<[^>]+>", "", decoded_data)
|
text_content = re.sub(r"<[^>]+>", "", decoded_data)
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,3 @@ async def gmail_callback(
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Unexpected error in Gmail callback: {e!s}", exc_info=True)
|
logger.error(f"Unexpected error in Gmail callback: {e!s}", exc_info=True)
|
||||||
# Redirect to frontend with error
|
|
||||||
return RedirectResponse(
|
|
||||||
url=f"{config.NEXT_FRONTEND_URL}/dashboard/{space_id}/connectors/add/google-gmail-connector?error=auth_failed"
|
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue