Commit b2d26257 authored by Steffen van Bergerem's avatar Steffen van Bergerem

Use the correct flash message for new conversations

parent 7c6e7dbf
......@@ -2,9 +2,11 @@ var response = <%= raw @response.to_json %>;
<% if session[:mobile_view] %>
window.location.href = "<%= conversations_path(conversation_id: @conversation.id) %>";
<% else %>
app.flashMessages._flash(response.message, response.success);
if(response.success){
app.flashMessages.success(response.message);
$("#new_conversation").removeClass('form_do_not_clear').clearForm();
window.location.href = "<%= conversations_path(conversation_id: @conversation.id) %>";
} else {
app.flashMessages.error(response.message);
}
<% end %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment