inboxes
inboxes copied to clipboard
0 messages
Can I ask why in method unread_messages_count_for you compare user_id with speaker.id and not speaker.user_id?
def unread_messages_count_for(user)
speaker = find_speaker_by_user(user)
messages.where("updated_at > ?", speaker.updated_at ).where("user_id != ?", speaker.id ).count
end
I use inboxes in different user intefaces(admin and customer) and in case when admin send message to customer it method always return 0
Hello. Sorry, but this project is archived. Works by project no longer conducted.