2017-07-24 16:13:53 +01:00
|
|
|
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
|
2017-08-01 20:53:39 +01:00
|
|
|
render json: { content: content }
|
2017-07-24 16:13:53 +01:00
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
raise Discourse::NotFound
|
|
|
|
|
|
|
|
|
|
end
|
2017-08-01 20:53:39 +01:00
|
|
|
end
|