mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-11 17:32:41 +01:00
22ce74c5a8
Summary: we weren't updating the "latest seen transaction PHID" properly. do that and ONLY do it from the view handler so we know the user got a real good chance of actually seeing the message. also we weren't searching through the transactions correctly; fix that. Test Plan: sent a test user some messages. noted the proper count of unread messages. Reviewers: epriestley, chad Reviewed By: chad CC: aran, Korvin Maniphest Tasks: T2399 Differential Revision: https://secure.phabricator.com/D4677
28 lines
685 B
PHP
28 lines
685 B
PHP
<?php
|
|
|
|
/**
|
|
* @group conpherence
|
|
*/
|
|
final class ConpherenceParticipant extends ConpherenceDAO {
|
|
|
|
protected $participantPHID;
|
|
protected $conpherencePHID;
|
|
protected $participationStatus;
|
|
protected $behindTransactionPHID;
|
|
protected $dateTouched;
|
|
|
|
public function markUpToDate(ConpherenceTransaction $xaction) {
|
|
if (!$this->isUpToDate()) {
|
|
$this->setParticipationStatus(ConpherenceParticipationStatus::UP_TO_DATE);
|
|
$this->setBehindTransactionPHID($xaction->getPHID());
|
|
$this->save();
|
|
}
|
|
return $this;
|
|
}
|
|
|
|
public function isUpToDate() {
|
|
return $this->getParticipationStatus() ==
|
|
ConpherenceParticipationStatus::UP_TO_DATE;
|
|
}
|
|
|
|
}
|