UserClearNewTalkNotification hook: Only guarantee a UserIdentity
Bug: T253435 Change-Id: Ia46b67ff284a8b9bc0d500e7b8536c2e84faef61
This commit is contained in:
parent
0eebd3ef55
commit
0eb1de24a7
3 changed files with 6 additions and 6 deletions
|
|
@ -3731,7 +3731,7 @@ $action: Action being checked
|
|||
|
||||
'UserClearNewTalkNotification': Called when clearing the "You have new
|
||||
messages!" message, return false to not delete it.
|
||||
[&]$user: User (object) that will clear the message
|
||||
[&]$userIdentity: UserIdentiy for the user that will clear the message
|
||||
$oldid: ID of the talk page revision being viewed (0 means the most recent one)
|
||||
|
||||
'UserEffectiveGroups': Called in User::getEffectiveGroups().
|
||||
|
|
|
|||
|
|
@ -4181,10 +4181,10 @@ class HookRunner implements
|
|||
);
|
||||
}
|
||||
|
||||
public function onUserClearNewTalkNotification( $user, $oldid ) {
|
||||
public function onUserClearNewTalkNotification( $userIdentity, $oldid ) {
|
||||
return $this->container->run(
|
||||
'UserClearNewTalkNotification',
|
||||
[ $user, $oldid ]
|
||||
[ $userIdentity, $oldid ]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace MediaWiki\User\Hook;
|
||||
|
||||
use User;
|
||||
use MediaWiki\User\UserIdentity;
|
||||
|
||||
/**
|
||||
* @stable for implementation
|
||||
|
|
@ -14,9 +14,9 @@ interface UserClearNewTalkNotificationHook {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param User $user User that will clear the message
|
||||
* @param UserIdentity $userIdentity User that will clear the message
|
||||
* @param int $oldid ID of the talk page revision being viewed (0 means the most recent one)
|
||||
* @return bool|void True or no return value to continue or false to abort (not clear the message)
|
||||
*/
|
||||
public function onUserClearNewTalkNotification( $user, $oldid );
|
||||
public function onUserClearNewTalkNotification( $userIdentity, $oldid );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue