to set presence you use PUT, not POST

This commit is contained in:
Sorunome 2020-06-05 10:56:42 +00:00 committed by Christian Pauly
parent e84126f3c5
commit bd3c51924b
2 changed files with 3 additions and 3 deletions

View file

@ -1295,7 +1295,7 @@ class MatrixApi {
String statusMsg,
}) async {
await request(
RequestType.POST,
RequestType.PUT,
'/client/r0/presence/${Uri.encodeComponent(userId)}/status',
data: {
'presence': presenceType.toString().split('.').last,

View file

@ -1493,8 +1493,6 @@ class FakeMatrixApi extends MockClient {
}
}
},
'/client/r0/presence/${Uri.encodeComponent('@alice:example.com')}/status':
(var req) => {},
'/client/r0/account/deactivate': (var req) =>
{'id_server_unbind_result': 'success'},
'/client/r0/user_directory/search': (var req) => {
@ -1678,6 +1676,8 @@ class FakeMatrixApi extends MockClient {
'/client/r0/rooms/!localpart%3Aserver.abc/invite': (var reqI) => {},
},
'PUT': {
'/client/r0/presence/${Uri.encodeComponent('@alice:example.com')}/status':
(var req) => {},
'/client/r0/pushrules/global/content/nocake/enabled': (var req) => {},
'/client/r0/pushrules/global/content/nocake/actions': (var req) => {},
'/client/r0/rooms/%21localpart%3Aserver.abc/state/m.room.history_visibility':