update README to contain missing api endpoints; abort execution when no message should be send

This commit is contained in:
2018-03-19 13:48:34 +01:00
parent eb414e67df
commit ff4947a49d
2 changed files with 7 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ class MatrixConnection
$send_message = NULL; $send_message = NULL;
if (!$message) { if (!$message) {
error_log("no message to send"); error_log("no message to send");
return false;
} elseif(is_array($message)) { } elseif(is_array($message)) {
$send_message = $message; $send_message = $message;
} elseif ($message instanceof MatrixMessage) { } elseif ($message instanceof MatrixMessage) {

View File

@@ -22,9 +22,9 @@ This is done in several steps:
- To integrate with matrix-synapse-rest-auth: - To integrate with matrix-synapse-rest-auth:
- `/_matrix-internal/identity/v1/check_credentials` should map to `internal/login.php` - `/_matrix-internal/identity/v1/check_credentials` should map to `internal/login.php`
- To integrate with mxisd: Have a look at [the docs](https://github.com/kamax-io/mxisd/blob/master/docs/backends/rest.md) and apply as follows: - To integrate with mxisd: Have a look at [the docs](https://github.com/kamax-io/mxisd/blob/master/docs/backends/rest.md) and apply as follows:
| Key | file which handles that | Description | | Key | file which handles that | Description |
|--------------------------------|-------------------------|------------------------------------------------------| |--------------------------------|-------------------------------|------------------------------------------------------|
| rest.endpoints.auth | internal/login.php | Validate credentials and get user profile | | rest.endpoints.auth | internal/login.php | Validate credentials and get user profile |
| rest.endpoints.directory | to follow | Search for users by arbitrary input | | rest.endpoints.directory | internal/directory_search.php | Search for users by arbitrary input |
| rest.endpoints.identity.single | to follow | Endpoint to query a single 3PID | | rest.endpoints.identity.single | internal/identity_single.php | Endpoint to query a single 3PID |
| rest.endpoints.identity.bulk | to follow | Endpoint to query a list of 3PID | | rest.endpoints.identity.bulk | internal/identity_bulk.php | Endpoint to query a list of 3PID |