From a39d734540eb36552c4e0e1bf9f09e6250f2711f Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 13 Feb 2022 15:39:58 +0100 Subject: [PATCH] joke_bot: Rename handle_messages to handle_message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … since it only handles one message. --- examples/joke_bot/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/joke_bot/src/main.rs b/examples/joke_bot/src/main.rs index 3996504e..b1d94b0a 100644 --- a/examples/joke_bot/src/main.rs +++ b/examples/joke_bot/src/main.rs @@ -96,7 +96,7 @@ async fn run() -> Result<(), Box> { // Use a regular for loop for the messages within one room to handle them sequentially for e in &room_info.timeline.events { if let Err(err) = - handle_messages(http_client, matrix_client, e, room_id, user_id).await + handle_message(http_client, matrix_client, e, room_id, user_id).await { eprintln!("failed to respond to message: {}", err) } @@ -142,7 +142,7 @@ async fn create_matrix_session( } } -async fn handle_messages( +async fn handle_message( http_client: &HttpClient, matrix_client: &MatrixClient, e: &Raw,