2021-06-09 23:22:28 +00:00
|
|
|
/**
|
|
|
|
* 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
|
2020-12-03 22:32:35 +00:00
|
|
|
* @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.
|
2023-04-27 22:44:33 +00:00
|
|
|
* @param {boolean} wouldAutoCreate Whether saving the comment would automatically create a
|
|
|
|
* temporary account if the user is logged out
|
2021-06-29 15:35:37 +00:00
|
|
|
* @param {string} preloadContent Preload content, may be wikitext or HTML depending on `preloadContentMode`
|
|
|
|
* @param {string} preloadContentMode 'source' or 'visual'
|
2021-06-09 23:22:28 +00:00
|
|
|
*/
|
2023-04-27 22:44:33 +00:00
|
|
|
function CommentDetails( pageName, oldId, notices, wouldAutoCreate, preloadContent, preloadContentMode ) {
|
2021-06-09 23:22:28 +00:00
|
|
|
this.pageName = pageName;
|
|
|
|
this.oldId = oldId;
|
2020-12-03 22:32:35 +00:00
|
|
|
this.notices = notices;
|
2023-04-27 22:44:33 +00:00
|
|
|
this.wouldAutoCreate = wouldAutoCreate;
|
2021-06-29 15:35:37 +00:00
|
|
|
this.preloadContent = preloadContent;
|
|
|
|
this.preloadContentMode = preloadContentMode;
|
2021-06-09 23:22:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
OO.initClass( CommentDetails );
|
|
|
|
|
|
|
|
module.exports = CommentDetails;
|