|
|
@ -5,9 +5,10 @@ Client APIs
|
|
|
|
-----------
|
|
|
|
-----------
|
|
|
|
|
|
|
|
|
|
|
|
To set "I am typing for the next N msec"::
|
|
|
|
To set "I am typing for the next N msec"::
|
|
|
|
|
|
|
|
|
|
|
|
PUT .../rooms/<room_id>/typing/<user_id>
|
|
|
|
PUT .../rooms/<room_id>/typing/<user_id>
|
|
|
|
Content: { "typing": true, "timeout": N }
|
|
|
|
Content: { "typing": true, "timeout": N }
|
|
|
|
# timeout is in msec; I suggest no more than 20 or 30 seconds
|
|
|
|
# timeout is in milliseconds; suggested no more than 20 or 30 seconds
|
|
|
|
|
|
|
|
|
|
|
|
This should be re-sent by the client to continue informing the server the user
|
|
|
|
This should be re-sent by the client to continue informing the server the user
|
|
|
|
is still typing; I suggest a safety margin of 5 seconds before the expected
|
|
|
|
is still typing; I suggest a safety margin of 5 seconds before the expected
|
|
|
@ -15,6 +16,7 @@ timeout runs out. Just keep declaring a new timeout, it will replace the old
|
|
|
|
one.
|
|
|
|
one.
|
|
|
|
|
|
|
|
|
|
|
|
To set "I am no longer typing"::
|
|
|
|
To set "I am no longer typing"::
|
|
|
|
|
|
|
|
|
|
|
|
PUT ../rooms/<room_id>/typing/<user_id>
|
|
|
|
PUT ../rooms/<room_id>/typing/<user_id>
|
|
|
|
Content: { "typing": false }
|
|
|
|
Content: { "typing": false }
|
|
|
|
|
|
|
|
|
|
|
@ -46,13 +48,14 @@ Servers will emit EDUs in the following form::
|
|
|
|
"content": {
|
|
|
|
"content": {
|
|
|
|
"room_id": "!room-id-here:matrix.org",
|
|
|
|
"room_id": "!room-id-here:matrix.org",
|
|
|
|
"user_id": "@user-id-here:matrix.org",
|
|
|
|
"user_id": "@user-id-here:matrix.org",
|
|
|
|
"typing": true/false,
|
|
|
|
"typing": true/false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Server EDUs don't (currently) contain timing information; it is up to
|
|
|
|
Server EDUs don't (currently) contain timing information; it is up to
|
|
|
|
originating HSes to ensure they eventually send "stop" notifications.
|
|
|
|
originating HSes to ensure they eventually send "stop" notifications.
|
|
|
|
|
|
|
|
|
|
|
|
((This will eventually need addressing, as part of the wider typing/presence
|
|
|
|
.. TODO
|
|
|
|
timer addition work))
|
|
|
|
((This will eventually need addressing, as part of the wider typing/presence
|
|
|
|
|
|
|
|
timer addition work))
|
|
|
|
|
|
|
|
|
|
|
|