Merge "Use new isTalkPage/isTalkNamespace methods"
[lhc/web/wiklou.git] / resources / src / mediawiki.page.watch.ajax.js
index 1b401c7..f7fbeef 100644 (file)
                                .done( function ( watchResponse ) {
                                        var message, otherAction = action === 'watch' ? 'unwatch' : 'watch';
 
-                                       if ( mwTitle.getNamespaceId() > 0 && mwTitle.getNamespaceId() % 2 === 1 ) {
+                                       if ( mwTitle.isTalkPage() ) {
                                                message = action === 'watch' ? 'addedwatchtext-talk' : 'removedwatchtext-talk';
                                        } else {
                                                message = action === 'watch' ? 'addedwatchtext' : 'removedwatchtext';