Mark thread as chatting right after an invitation is accepted

This commit is contained in:
Dmitriy Simushev 2015-03-27 12:31:11 +00:00
parent 70f630d125
commit a9eb9f8cf2
2 changed files with 1 additions and 2 deletions

View File

@ -638,7 +638,6 @@ function chat_start_for_user(
if (!$thread) {
die("Cannot start thread");
}
$thread->state = Thread::STATE_CHATTING;
} else {
// Create thread
$thread = new Thread();

View File

@ -183,7 +183,7 @@ function invitation_accept($visitor_id)
}
// Update thread info
$thread->state = Thread::STATE_LOADING;
$thread->state = Thread::STATE_CHATTING;
$thread->invitationState = Thread::INVITATION_ACCEPTED;
$thread->chatStarted = time();
$thread->save();