2017-07-24 11:13:53 -04:00
|
|
|
class DiscourseChat::PublicController < ApplicationController
|
|
|
|
requires_plugin DiscourseChat::PLUGIN_NAME
|
|
|
|
|
|
|
|
def post_transcript
|
|
|
|
params.require(:secret)
|
|
|
|
|
2017-10-03 05:42:07 -04:00
|
|
|
redis_key = "chat_integration:transcript:#{params[:secret]}"
|
2017-07-24 11:13:53 -04:00
|
|
|
content = $redis.get(redis_key)
|
|
|
|
|
|
|
|
if content
|
2017-08-01 15:53:39 -04:00
|
|
|
render json: { content: content }
|
2017-10-03 05:42:07 -04:00
|
|
|
else
|
|
|
|
raise Discourse::NotFound
|
2017-07-24 11:13:53 -04:00
|
|
|
end
|
|
|
|
end
|
2017-08-01 15:53:39 -04:00
|
|
|
end
|