Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Can I change slack config for each reply? #132

Open
motsat opened this issue Dec 10, 2018 · 0 comments
Open

Can I change slack config for each reply? #132

motsat opened this issue Dec 10, 2018 · 0 comments

Comments

@motsat
Copy link

motsat commented Dec 10, 2018

For example, if config.adapters.slack.parse is set to full,

Lita.configure do |config|
  …
  config.robot.adapter = :slack
  config.adapters.slack.parse = "full"
  …
end

Is it possible to switch temporarily when replying?

module Lita
  module Handlers
    class Hello < Handler
      route /^test/, :reply_test

      def reply_test( response )
         # Change config to config.adapters.slack.parse = "none"
         response.reply "<https://foo/my_link|my_link>"
         # Change config to config.adapters.slack.parse = "full"
         response.reply "https://foo/my_image.png"
      end
      Lita.register_handler(self)
    end
  end
end
@motsat motsat changed the title Can I change slack config for each reply Can I change slack config for each reply? Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant