Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
81b956c7
Commit
81b956c7
authored
10 years ago
by
Kegan Dougal
Browse files
Options
Downloads
Patches
Plain Diff
Add spec-additions.rst with info on recaptcha and common event fields.
parent
d224358e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/spec-additions.rst
+89
-0
89 additions, 0 deletions
docs/spec-additions.rst
with
89 additions
and
0 deletions
docs/spec-additions.rst
0 → 100644
+
89
−
0
View file @
81b956c7
In C-S API > Registration/Login:
Captcha-based
~~~~~~~~~~~~~
:Type:
``m.login.recaptcha``
:Description:
Login is supported by responding to a captcha, in this case Google's
Recaptcha.
To respond to this type, reply with::
{
"type": "m.login.recaptcha",
"challenge": "<challenge token>",
"response": "<user-entered text>"
}
The Recaptcha parameters can be obtained in Javascript by calling::
Recaptcha.get_challenge();
Recaptcha.get_response();
The home server MUST respond with either new credentials, the next stage of the
login process, or a standard error response.
In Events:
Common event fields
-------------------
All events MUST have the following fields:
``event_id``
Type:
String.
Description:
Represents the globally unique ID for this event.
``type``
Type:
String.
Description:
Contains the event type, e.g. ``m.room.message``
``content``
Type:
JSON Object.
Description:
Contains the content of the event. When interacting with the REST API, this is the HTTP body.
``room_id``
Type:
String.
Description:
Contains the ID of the room associated with this event.
``user_id``
Type:
String.
Description:
Contains the fully-qualified ID of the user who *sent* this event.
State events have the additional fields:
``state_key``
Type:
String.
Description:
Contains the state key for this state event. If there is no state key for this state event, this
will be an empty string. The presence of ``state_key`` makes this event a state event.
``required_power_level``
Type:
Integer.
Description:
Contains the minimum power level a user must have before they can update this event.
``prev_content``
Type:
JSON Object.
Description:
Optional. Contains the previous ``content`` for this event. If there is no previous content, this
key will be missing.
.. TODO-spec
How do "age" and "ts" fit in to all this? Which do we expose?
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment