00867: New notify option to exclude notification of selected author's posts

Summary: New notify option to exclude notification of selected author's posts
Created: 2007-01-16 23:07
Status: Open
Category: Feature
From: ThomasP
Priority: 443

Description: When an author makes changes to a page in the wiki, she herself (besides other readers) will be notified of this change. This is not necessary and desired, especially in few-user low-traffic sites where notifications are rare and one has a good overview over his own changes. (Consider the collaboration tool scenario where one wants to be notified of the changes made by the colleague.)

It would thus be good to have another notify variable "author", which can take as option the people changes of whom should be notified of. The value of this variable should default to "all".


 notify=alice@example.com squelch=86400 author=-Alice

notifies Alice of all changes that are NOT made by herself.

Suggestion for solution

A solution is to add the lines

    if ($opt['author']) {
      $pageauthor = FmtPageName('{$LastModifiedBy}', $pagename);
      if (!MatchPageNames(array($pageauthor), $opt['author']))

directly after

    if ($opt['group']) $pats[] = FixGlob($opt['group'], '$1$2.*');
    if ($opt['name']) $pats[] = FixGlob($opt['name'], '$1*.$2');
    if ($pats && !MatchPageNames($pagename, $pats)) continue;

in function NotifyUpdate() in scripts/notify.php.

Remark: Note that this captures the originator of the change from the LastModifiedBy field of the page just posted, so it will not correctly extend to the case where notifications about uploads are to be issued (in case that will be implemented). In the long run the originator of the event should be saved in the notification table (together with the notify item, times etc.) and be captured from the global $Author variable.

See also

Other feature requests concerning notification are: