Page MenuHomePhabricator

Echo Mentions should trigger, if a signature only contains a usertalkpage link, and not a userpage link
Closed, ResolvedPublic

Description

This edit didn't trigger a mention-notification because the sender's signature only contains a link to their usertalkpage.

Many users redirect their userpage directly to their usertalkpage, and some of those users also change their signature to only link to the usertalkpage. The Mention-Notifications system should recognize these signatures.

Event Timeline

Quiddity created this task.Dec 7 2014, 5:01 AM
Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a project: Notifications.
Quiddity changed Security from none to None.
Quiddity added subscribers: Quiddity, Gryllida.
Quiddity triaged this task as Medium priority.Dec 7 2014, 5:08 AM
Krenair added a subscriber: Krenair.Dec 7 2014, 5:13 AM
czar added a subscriber: czar.Dec 7 2014, 5:35 AM
revi added a subscriber: revi.Dec 14 2014, 12:22 PM
FriedhelmW reopened this task as Open.Jan 29 2015, 10:10 AM
FriedhelmW added a subscriber: FriedhelmW.

Reopening this as it is more specific.

Schnark closed this task as Invalid.Jan 30 2015, 9:00 AM
Schnark claimed this task.

@FriedhelmW: Please read my rationale for closing this as duplicate I gave in T76961#1000663. Signatures only containing a link to the talk page do work, so this task is not more specific, as it only says that a ping failed for some unknown reason.

 if ( !$winningUser ) {
    return false;
}

Shouldn't that be

  if ( $winningUser === false ) {
    return false;
}
$startCheckAt = max( 0, $timestampPos - 300 );
$context = substr( $potentialContext, -$startCheckAt );

is this correct?

@FriedhelmW That particular bit of code was just changed today, mostly just to add rational for how it works and why at https://gerrit.wikimedia.org/r/#/c/173455/5/includes/DiscussionParser.php

Your best bet to determine if it is correct is to work through the unit tests for that particular function. The test for that function is at https://github.com/wikimedia/mediawiki-extensions-Echo/blob/master/tests/phpunit/includes/DiscussionParserTest.php#L62 . It is fed data from the dataProvider a few lines down, the signingDetectionData() method. For a given message the function needs to return two pieces of data, The number of characters in the content and the name of the user that signed it. It has become a bit odd over time trying to fit all the conditions set forth by real world cases that have made it into that unit test.

@FriedhelmW also @matthiasmullie just submitted https://gerrit.wikimedia.org/r/#/c/187850/ today, which is making a much bigger overhaul. If you wanted to test and code review the patch it would be most appreciated.

matthiasmullie changed the task status from Invalid to Resolved.Mar 3 2015, 5:04 PM

Pretty sure https://gerrit.wikimedia.org/r/#/c/187850/ patch has fixed this issue. Should that not be the case, please reopen!