diff --git a/app/controllers/conversations_controller.rb b/app/controllers/conversations_controller.rb index 6894dbdf7f685b519c5d26ecd3cb38098d2224e5..24c1fca3a8d13fbb4807b0978a815b60609470ac 100644 --- a/app/controllers/conversations_controller.rb +++ b/app/controllers/conversations_controller.rb @@ -56,7 +56,8 @@ class ConversationsController < ApplicationController end def new - all_contacts_and_ids = Contact.connection.execute(current_user.contacts.joins(:person => :profile).select("contacts.id, profiles.first_name, profiles.last_name, profiles.diaspora_handle").to_sql).map do |r| + all_contacts_and_ids = Contact.connection.execute(current_user.contacts.joins(:person => :profile + ).select("contacts.id, profiles.first_name, profiles.last_name, people.diaspora_handle").to_sql).map do |r| {:value => r[0], :name => Person.name_from_attrs(r[1], r[2], r[3]).gsub(/(")/, "'")} end