3 final class PhabricatorFeedStoryNotification
extends PhabricatorFeedDAO
{
6 protected $primaryObjectPHID;
7 protected $chronologicalKey;
10 protected function getConfiguration() {
12 self
::CONFIG_IDS
=> self
::IDS_MANUAL
,
13 self
::CONFIG_TIMESTAMPS
=> false,
14 self
::CONFIG_COLUMN_SCHEMA
=> array(
15 'chronologicalKey' => 'uint64',
16 'hasViewed' => 'bool',
19 self
::CONFIG_KEY_SCHEMA
=> array(
22 'columns' => array('userPHID', 'chronologicalKey'),
25 'userPHID_2' => array(
26 'columns' => array('userPHID', 'hasViewed', 'primaryObjectPHID'),
28 'key_object' => array(
29 'columns' => array('primaryObjectPHID'),
31 'key_chronological' => array(
32 'columns' => array('chronologicalKey'),
35 ) + parent
::getConfiguration();
38 public static function updateObjectNotificationViews(
39 PhabricatorUser
$user,
42 if (PhabricatorEnv
::isReadOnly()) {
46 $unguarded = AphrontWriteGuard
::beginScopedUnguardedWrites();
48 $notification_table = new PhabricatorFeedStoryNotification();
49 $conn = $notification_table->establishConnection('w');
56 AND primaryObjectPHID = %s
58 $notification_table->getTableName(),
64 $count_key = PhabricatorUserNotificationCountCacheType
::KEY_COUNT
;
65 PhabricatorUserCache
::clearCache($count_key, $user->getPHID());
66 $user->clearCacheData($count_key);