4 * This is the abstract base class for MessagePoster implementations.
10 * @param {mw.Title} title Title to post to
12 mw.messagePoster.MessagePoster = function MwMessagePoster() {};
14 OO.initClass( mw.messagePoster.MessagePoster );
17 * Post a message (with subject and body) to a talk page.
20 * @param {string} subject Subject/topic title. The amount of wikitext supported is
21 * implementation-specific. It is recommended to only use basic wikilink syntax for
22 * maximum compatibility.
23 * @param {string} body Body, as wikitext. Signature code will automatically be added
24 * by MessagePosters that require one, unless the message already contains the string
26 * @return {jQuery.Promise} Promise completing when the post succeeds or fails.
27 * For failure, will be rejected with three arguments:
29 * - primaryError - Primary error code. For a mw.Api failure,
30 * this should be 'api-fail'.
31 * - secondaryError - Secondary error code. For a mw.Api failure,
32 * this, should be mw.Api's code, e.g. 'http', 'ok-but-empty', or the error passed through
34 * - details - Further details about the error
37 * The base class currently does nothing, but could be used for shared analytics or
40 mw.messagePoster.MessagePoster.prototype.post = function () {};