mw.messagePoster.WikitextMessagePoster(title, api)

An implementation of MessagePoster for wikitext talk pages.

Constructor

new mw.messagePoster.WikitextMessagePoster(title, api) #

Posts messages to wikitext talk pages.

Parameters:

Name Type Description
title mw.Title

Wikitext page in a talk namespace, to post to

api mw.Api

mw.Api object to use

Source:
Posts messages to wikitext talk pages.

Extends

Methods

post(subject, body, optionsopt) → {jQuery.Promise}abstract #

Post a message (with subject and body) to a talk page.

Parameters:

Name Type Attributes Description
subject string

Subject/topic title. The amount of wikitext supported is implementation-specific. It is recommended to only use basic wikilink syntax for maximum compatibility.

body string

Body, as wikitext. Signature code will automatically be added by MessagePosters that require one, unless the message already contains the string '~~~'.

options Object <optional>

Message options. See MessagePoster implementations for details.

Inherited From:
Source:

Returns:

Promise completing when the post succeeds or fails. For failure, will be rejected with three arguments:

  • primaryError - Primary error code. For a mw.Api failure, this should be 'api-fail'.
  • secondaryError - Secondary error code. For a mw.Api failure, this, should be mw.Api's code, e.g. 'http', 'ok-but-empty', or the error passed through from the server.
  • details - Further details about the error
Type
jQuery.Promise
Post a message (with subject and body) to a talk page.