Skip to content

Commit

Permalink
Fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
bubasuma committed Jan 23, 2016
1 parent 70c0c13 commit ae5edda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ConversationWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function registerJs()
{
$id = $this->options['id'];
if (!isset($this->clientOptions['selector'])) {
$this->clientOptions['selector'] = '.' . strstr($this->itemOptions['class'], ' ', true);
$class = explode(' ', $this->itemOptions['class']);
$this->clientOptions['selector'] = '.' . $class[0];
}
$options = Json::htmlEncode($this->clientOptions);
$user = Json::htmlEncode($this->user);
Expand Down
2 changes: 1 addition & 1 deletion db/ConversationQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function init()
->params([':userId' => $this->userId])
->groupBy(['[[contact_id]]']);

$this->select(['contact_id', 'id', 'sender_id', 'text', 'created_at'])
$this->select(['ms.contact_id', 'm.id', 'm.sender_id', 'm.text', 'm.created_at'])
->from(['ms' => $subQuery])
->innerJoin(['m' => $tableName], '[[last_message_id]] = [[id]]')
->orderBy(['id' => SORT_DESC])
Expand Down

0 comments on commit ae5edda

Please sign in to comment.