munafio / chatify

Laravel's #1 one-to-one chatting system package, helps you add a complete real-time chatting system to your new/existing Laravel application with only one command.
https://chatify.munafio.com
MIT License
2.24k stars 480 forks source link

Missing contacts/ users #140

Closed jgwisdala closed 3 years ago

jgwisdala commented 3 years ago

First off, thank you for your wonderful contribution on the Laravel / Chat front. I receive a 'Your contact list is empty'. 4 users in the system and they are able to login. NPM ran fine. No errors within browser (console or network). Pusher connecting properly. Can send messages to myself. ch_messages table is storing information correctly for both logged in users (msg sent to themselves). Tried from firefox and edge. Neither can see users. Users register active_status = 1. No problem saving avatars. At a loss.

image

munafio commented 3 years ago

@jgwisdala In the network tab, click on (getContacts) request and check its response if it returns them or not.

jgwisdala commented 3 years ago

@munafio - Apologies on delay in response. I've been out of town. getContacts is working correctly. The issue appears to be with search. Laravel route list shows 'search' and no conflicts. Any search using chatify results with Internal Error 500.

image

image

Thanks!

jgwisdala commented 3 years ago

Located issue after turning debug back on. Turns out my user table had columns (first and last) instead of name. Made a few changes to the layout and controller... all is good now. Thank you!

samialtaher commented 2 years ago

Hello, I have the same issue, my user table has first_name and last_name. But I have no clue how and where to make the changes. Can you or the author assist.

Thanks

munafio commented 2 years ago

@samialtaher If you have published the controllers of the package (mentioned at the docs), then all you have to do is to make your changes there at MessagesController.

Also, the views of the package need to be changed as well.

samialtaher commented 2 years ago

Actually, I just created an Accessor and appends to the User controller and this solved this issue

protected $appends = ['name'];

function getNameAttribute() { return $this->first_name . ' ' . $this->last_name; }

NEVELYNE commented 1 year ago

image My Network tab has no error.

When I click on the getContacts method, it doesn't retrieve my users. What could I have missed. Kindly guide me

NEVELYNE commented 1 year ago

I don't even have a provision of messaging myself Any assistance please.