Skip to content

Commit

Permalink
Revert "fix: bugs"
Browse files Browse the repository at this point in the history
This reverts commit 4a84263.
  • Loading branch information
madawei2699 committed Apr 13, 2023
1 parent 4a84263 commit 125e83e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,10 @@ def log_message(logger, event, say):
except Exception as e:
logger.error(f"Error responding to direct message: {e}")

@slack_app.event(event="member_joined_channel")
@slack_app.event(event="team_join")
def send_welcome_message(logger, event, say):
logger.info(f"Welcome new user: {event}")
user = event["user"]
channel = event["channel"]
user_info = get_user(user)
welcome_message_block = [
{
Expand Down Expand Up @@ -347,8 +346,7 @@ def send_welcome_message(logger, event, say):
}
}
]
if channel == 'C02S9S07UKV': # general channel
say(blocks=welcome_message_block, channel=user_info.user.id)
say(blocks=welcome_message_block, channel=user_info.user.id)

@slack_app.event("app_home_opened")
def update_home_tab(client, event, logger):
Expand Down

0 comments on commit 125e83e

Please sign in to comment.