mediawiki-extensions-Discus.../modules/CommentDetails.js
Bartosz Dziewoński a36d6ad5c6 Show edit notices in the new discussion tool
Considerations:
* Using the same edit notices as VisualEditor, except 'anoneditwarning'
* No extra frame/styling is added (on Wikimedia wikis, the notices
  often already have them)
* 'talkpagetext' message is not shown (on Wikimedia wikis, they are
  mostly about signing your posts with tildes, which is not necessary)

Bug: T269033
Change-Id: Idc5ff29f093c75a14c3a3479888295d5bf630f6d
2021-06-22 21:40:51 +02:00

20 lines
636 B
JavaScript

/**
* More information about a comment obtained from various APIs, rather than parsed from the page.
*
* @class CommentDetails
* @constructor
* @param {string} pageName Page name the reply is being saved to
* @param {number} oldId Revision ID of page at time of editing
* @param {Object.<string,string>} notices Edit notices for the page where the reply is being saved.
* Keys are message names; values are HTML to display.
*/
function CommentDetails( pageName, oldId, notices ) {
this.pageName = pageName;
this.oldId = oldId;
this.notices = notices;
}
OO.initClass( CommentDetails );
module.exports = CommentDetails;