bubasuma / yii2-simplechat

A simple chat for your yii2 application
87 stars 38 forks source link

new conversation #12

Closed dub34 closed 8 years ago

dub34 commented 8 years ago

Hi. How can i create a new conversation, if i don`t have any? For example, if i open "message" page first time after install module, i get an exception "You have no active conversations". There is no contact list or other? only archive conversations widget? Thank you

bubasuma commented 8 years ago

Hi @dub34 If you are running the demo, this error is not likely to happen since the command php yii simplechat/start loads fixtures into the database unless you delete data from the database. You are getting this error because there is no rows in message table. If you access the page through /messages, the backend automatically set the last conversation as the active conversion and the URL is updated dynamically on frontend /messages/last_contact_id. To create new conversation you have to access the page through /messages/contact_id. Where contact_id is the user's id you wanna write a message.

dub34 commented 8 years ago

thank`s. I override your templates, models and controller. Create contact list instead convesations list.