Path: blob/master/src/applications/conpherence/storage/ConpherenceParticipant.php
12256 views
<?php12final class ConpherenceParticipant extends ConpherenceDAO {34protected $participantPHID;5protected $conpherencePHID;6protected $seenMessageCount;7protected $settings = array();89protected function getConfiguration() {10return array(11self::CONFIG_SERIALIZATION => array(12'settings' => self::SERIALIZATION_JSON,13),14self::CONFIG_COLUMN_SCHEMA => array(15'seenMessageCount' => 'uint64',16),17self::CONFIG_KEY_SCHEMA => array(18'conpherencePHID' => array(19'columns' => array('conpherencePHID', 'participantPHID'),20'unique' => true,21),22'key_thread' => array(23'columns' => array('participantPHID', 'conpherencePHID'),24),25),26) + parent::getConfiguration();27}2829public function getSettings() {30return nonempty($this->settings, array());31}3233public function markUpToDate(ConpherenceThread $conpherence) {3435if (!$this->isUpToDate($conpherence)) {36$this->setSeenMessageCount($conpherence->getMessageCount());37$this->save();3839PhabricatorUserCache::clearCache(40PhabricatorUserMessageCountCacheType::KEY_COUNT,41$this->getParticipantPHID());42}4344return $this;45}4647public function isUpToDate(ConpherenceThread $conpherence) {48return ($this->getSeenMessageCount() == $conpherence->getMessageCount());49}5051}525354