mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Don't put a whole User object in extra[mentioned-users]
DiscussionParser::getUserMentions() returns mentions in an array of the form [ID => ID]. UserLocator says "we shouldn't receive User instances, but allow it for backward compatability". But DiscussionParser::generateEventsForRevision() was putting User objects into the extra when there is a mention in the edit summary. I noticed this when I accidentally made User objects be unserializable in a core patch. So, I made generateEventsForRevision() generate mention arrays in the same ID=>ID format as getUserMentions(). Change-Id: I7c6d25950c8887b50426863c7b0a2d5d007559dd
This commit is contained in:
parent
4b6c8fe025
commit
41d53fde50
|
@ -124,7 +124,7 @@ abstract class EchoDiscussionParser {
|
|||
if ( $count >= $wgEchoMaxMentionsInEditSummary ) {
|
||||
break;
|
||||
}
|
||||
$mentionedUsers[] = $summaryUser;
|
||||
$mentionedUsers[$summaryUser->getId()] = $summaryUser->getId();
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue