Skip to content

Commit

Permalink
event payload missing view
Browse files Browse the repository at this point in the history
  • Loading branch information
srtaalej committed Aug 5, 2024
1 parent aa27d7f commit 5ff1313
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions listeners/events/app_home_opened.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from logging import Logger
from ai.ai_utils.get_available_apis import get_available_apis
from slack_bolt import BoltContext
from slack_sdk import WebClient
from state_store.get_user_state import get_user_state


def app_home_opened_callback(event, logger: Logger, client: WebClient):
def app_home_opened_callback(event, logger: Logger, client: WebClient, context: BoltContext):
if event["tab"] != "home":
return

Expand Down Expand Up @@ -37,7 +38,7 @@ def app_home_opened_callback(event, logger: Logger, client: WebClient):
try:
client.views_publish(
user_id=event["user"],
view_id=event["view"]["id"],
view_id=context["enterprise_id"],
view={
"type": "home",
"blocks": [
Expand Down

0 comments on commit 5ff1313

Please sign in to comment.