soxtoby / SlackNet

A comprehensive Slack API client for .NET
MIT License
211 stars 67 forks source link

AspNetCoreExample in socket mode does not receive events #203

Closed tahasi closed 4 months ago

tahasi commented 4 months ago

I'm new to Slack app development and I'm undoubtably doing something wrong.

I configured the AspNetCoreExample/appsettings.json with my Slack app's tokens and secrets followed by changing the example's call to SlackEndpointConfiguration.UseSocketMode to pass true.

I then set a break point in SlackSocketModeClient.HandleRequest, run the example, switch to the Slack application, navigate to my app's App Home and type a message.

I expected that SlackSocketModeClient.HandleRequest would be called and I'd have an opportunity to learn about the messaging that my app will receive from Slack.

Unfortunately, I'm not seeing any messages coming from Slack.

Is there more that needs to be changed in the example to enable running locally in web-socket mode?

Here's my app's manifest:

display_information:
  name: Aegis App
  description: Your one place incident manager.
  background_color: "#3d4a75"
  long_description: Your one place incident manager with a lot more verbiage to ensure that this description is at least 175 characters which is actually a lot of characters to require for an application's description.
features:
  bot_user:
    display_name: Aegis App
    always_online: true
oauth_config:
  scopes:
    bot:
      - app_mentions:read
      - channels:manage
      - users:read
      - users:read.email
      - channels:read
      - usergroups:read
      - im:read
      - mpim:read
      - chat:write
settings:
  interactivity:
    is_enabled: true
  org_deploy_enabled: false
  socket_mode_enabled: true
  token_rotation_enabled: false
tahasi commented 4 months ago

The app manifest was missing settings.event_subscriptions; hence, not it was not subscribed events.