3 final class ConpherenceParticipant
extends ConpherenceDAO
{
5 protected $participantPHID;
6 protected $conpherencePHID;
7 protected $seenMessageCount;
8 protected $settings = array();
10 protected function getConfiguration() {
12 self
::CONFIG_SERIALIZATION
=> array(
13 'settings' => self
::SERIALIZATION_JSON
,
15 self
::CONFIG_COLUMN_SCHEMA
=> array(
16 'seenMessageCount' => 'uint64',
18 self
::CONFIG_KEY_SCHEMA
=> array(
19 'conpherencePHID' => array(
20 'columns' => array('conpherencePHID', 'participantPHID'),
23 'key_thread' => array(
24 'columns' => array('participantPHID', 'conpherencePHID'),
27 ) + parent
::getConfiguration();
30 public function getSettings() {
31 return nonempty($this->settings
, array());
34 public function markUpToDate(ConpherenceThread
$conpherence) {
36 if (!$this->isUpToDate($conpherence)) {
37 $this->setSeenMessageCount($conpherence->getMessageCount());
40 PhabricatorUserCache
::clearCache(
41 PhabricatorUserMessageCountCacheType
::KEY_COUNT
,
42 $this->getParticipantPHID());
48 public function isUpToDate(ConpherenceThread
$conpherence) {
49 return ($this->getSeenMessageCount() == $conpherence->getMessageCount());