fixed bug where translations were also broadcasted to other client and fixed bug where the same original and target language caused a 500 error

This commit is contained in:
Beatrice Olivera
2018-09-04 19:21:25 +01:00
parent f4467c65fd
commit b19a000729
3 changed files with 36 additions and 24 deletions

View File

@@ -29,7 +29,8 @@ class PagesController < ApplicationController
translation.text.gsub!("&#39;", "'")
ActionCable.server.broadcast "chat_room_#{params[:chat_room_id]}", {
translation: translation,
input: params[:input]
input: params[:input],
userId: current_user.id
}
end