Page MenuHomePhabricator

Help panel: create API module for posting messages to help desk, remove MessagePoster implementation
Closed, ResolvedPublic

Description

The API module will receive a POST request from step two of the help panel "ask a question" flow. It should:

  1. Save the user's email, if a new one was supplied
  2. send a verification email if the user's address is not yet confirmed.
  3. Create a new section header on the help desk, and append a timestamp.
  4. Post the received text with signature as an edit from the authorized user, using a help-panel tag (T211118)
  5. Return a response containing:
    1. success or error message & error code
    2. the section header, so that we can construct a link to take the user directly to their question on help desk
    3. the user's edit count after making the edit with the request.

The second part of this task is removing the MessagePoster implementation in favor of the new API module.

Related Objects

Event Timeline

kostajh renamed this task from Create API module for posting messages to help desk to Create API module for posting messages to help desk, remove MessagePoster implementation.Dec 6 2018, 8:10 PM
kostajh updated the task description. (Show Details)

Unassigning for now since I'm about to sign off for the day.

Change 478769 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] WIP: Help Panel: Add API module to post questions

https://gerrit.wikimedia.org/r/478769

MMiller_WMF renamed this task from Create API module for posting messages to help desk, remove MessagePoster implementation to Help panel: create API module for posting messages to help desk, remove MessagePoster implementation.Dec 11 2018, 10:37 PM
MMiller_WMF subscribed.

Change 478769 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Help Panel: Add API module to post questions

https://gerrit.wikimedia.org/r/478769

Etonkovidova subscribed.

Checked in betalabs api - works as expected - e.g.

{
    "helppanelquestionposter": {
        "result": "success",
        "revision": 387966,
        "isfirstedit": 0,
        "viewquestionurl": "https://en.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Help_desk#Help_panel_question_(01:00,_21_December_2018)",
        "email": "already_confirmed"
    }
}

The questions are correctly posted and email address is correctly identified as confirmed or as non-confirmed.