106 $this->hookRunner =
new HookRunner( $hookContainer );
124 if ( $this->readOnlyMode->isReadOnly() ) {
129 if ( !$this->permissionManager->userHasRight( $user,
'editmywatchlist' ) ) {
134 if ( !$this->options->get(
'UseEnotif' ) &&
135 !$this->options->get(
'ShowUpdatedMarker' )
137 $this->talkPageNotificationManager->removeUserHasNewMessages( $user );
141 $userId = $user->
getId();
146 $this->watchedItemStore->resetAllNotificationTimestampsForUser( $user );
168 if ( $this->readOnlyMode->isReadOnly() ) {
173 if ( !$this->permissionManager->userHasRight( $user,
'editmywatchlist' ) ) {
183 if ( $userTalkPage ) {
185 if ( !$this->hookRunner->onUserClearNewTalkNotification( $user, $oldid ) ) {
192 DeferredUpdates::addCallableUpdate(
function () use (
212 RevisionLookup::READ_LATEST
228 if ( !$this->options->get(
'UseEnotif' ) &&
229 !$this->options->get(
'ShowUpdatedMarker' )
243 $force = $userTalkPage ?
'force' :
'';
244 $this->watchedItemStore->resetNotificationTimestamp( $user,
$title, $force, $oldid );
255 $userId = $user->
getId();
261 $cacheKey =
'u' . (string)$userId .
'-' .
262 (
string)
$title->getNamespace() .
':' .
$title->getDBkey();
265 if ( array_key_exists( $cacheKey, $this->notificationTimestampCache ) ) {
266 return $this->notificationTimestampCache[ $cacheKey ];
269 $watchedItem = $this->watchedItemStore->getWatchedItem( $user,
$title );
270 if ( $watchedItem ) {
271 $timestamp = $watchedItem->getNotificationTimestamp();
276 $this->notificationTimestampCache[ $cacheKey ] = $timestamp;
Class for managing the deferred updates.
Manages user talk page notifications.
setUserHasNewMessages(UserIdentity $user, RevisionRecord $curRev=null)
Update the talk page messages status.
userHasNewMessages(UserIdentity $user)
Check if the user has new messages.
removeUserHasNewMessages(UserIdentity $user)
Remove the new messages status.
A service class for fetching the wiki's current read-only mode.