Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/Api/Event/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Viber\Api\Event;

use Viber\Api\Event;
use Viber\Api\User;

/**
* Triggers when a user opens a conversation with the PA using the “message”
Expand All @@ -24,7 +25,7 @@ class Conversation extends Event
/**
* Viber user
*
* @var \Viber\Api\User
* @var User
*/
protected $user;

Expand All @@ -35,6 +36,14 @@ class Conversation extends Event
*/
protected $type;

/**
* Param "subscribed" is missing in documentation.
* It's "true" if user was subscribed but delete dialogue without unsubscribe
*
* @var bool
*/
protected $subscribed;

/**
* Get the value of Context information
*
Expand All @@ -48,7 +57,7 @@ public function getContext()
/**
* Get the value of Viber user
*
* @return \Viber\Api\User
* @return User
*/
public function getUser()
{
Expand All @@ -64,4 +73,12 @@ public function getType()
{
return $this->type;
}

/**
* @return bool
*/
public function isSubscribed()
{
return $this->subscribed;
}
}