David Taylor 2d7f25d7e6 Add support for chat transcripts
(still needs to be implemented by providers)
2017-07-24 16:13:53 +01:00

18 lines
376 B
Ruby

class DiscourseChat::PublicController < ApplicationController
requires_plugin DiscourseChat::PLUGIN_NAME
def post_transcript
params.require(:secret)
redis_key = "chat_integration:transcript:" + params[:secret]
content = $redis.get(redis_key)
if content
render json: {content: content}
return
end
raise Discourse::NotFound
end
end