From ff4947a49dd09c95e51b2f7b07fa2c4cd89165d2 Mon Sep 17 00:00:00 2001 From: Krombel Date: Mon, 19 Mar 2018 13:48:34 +0100 Subject: [PATCH] update README to contain missing api endpoints; abort execution when no message should be send --- MatrixConnection.php | 1 + README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MatrixConnection.php b/MatrixConnection.php index e6c52bc..aa63a3c 100644 --- a/MatrixConnection.php +++ b/MatrixConnection.php @@ -18,6 +18,7 @@ class MatrixConnection $send_message = NULL; if (!$message) { error_log("no message to send"); + return false; } elseif(is_array($message)) { $send_message = $message; } elseif ($message instanceof MatrixMessage) { diff --git a/README.md b/README.md index b613d0f..7af7bb2 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ This is done in several steps: - To integrate with matrix-synapse-rest-auth: - `/_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: -| Key | file which handles that | Description | -|--------------------------------|-------------------------|------------------------------------------------------| -| 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.identity.single | to follow | Endpoint to query a single 3PID | -| rest.endpoints.identity.bulk | to follow | Endpoint to query a list of 3PID | +| Key | file which handles that | Description | +|--------------------------------|-------------------------------|------------------------------------------------------| +| rest.endpoints.auth | internal/login.php | Validate credentials and get user profile | +| rest.endpoints.directory | internal/directory_search.php | Search for users by arbitrary input | +| rest.endpoints.identity.single | internal/identity_single.php | Endpoint to query a single 3PID | +| rest.endpoints.identity.bulk | internal/identity_bulk.php | Endpoint to query a list of 3PID |