diff --git a/server/src/db.rs b/server/src/db.rs index f61f5d82b4..374761a73c 100644 --- a/server/src/db.rs +++ b/server/src/db.rs @@ -376,7 +376,7 @@ impl Db { }) } - pub async fn get_recent_channel_messages( + pub async fn get_channel_messages( &self, channel_id: ChannelId, count: usize, @@ -518,17 +518,14 @@ pub mod tests { .unwrap(); } - let messages = db - .get_recent_channel_messages(channel, 5, None) - .await - .unwrap(); + let messages = db.get_channel_messages(channel, 5, None).await.unwrap(); assert_eq!( messages.iter().map(|m| &m.body).collect::>(), ["5", "6", "7", "8", "9"] ); let prev_messages = db - .get_recent_channel_messages(channel, 4, Some(messages[0].id)) + .get_channel_messages(channel, 4, Some(messages[0].id)) .await .unwrap(); assert_eq!( diff --git a/server/src/rpc.rs b/server/src/rpc.rs index b74b923b0f..c712ced835 100644 --- a/server/src/rpc.rs +++ b/server/src/rpc.rs @@ -595,7 +595,7 @@ impl Server { let messages = self .app_state .db - .get_recent_channel_messages(channel_id, MESSAGE_COUNT_PER_PAGE, None) + .get_channel_messages(channel_id, MESSAGE_COUNT_PER_PAGE, None) .await? .into_iter() .map(|msg| proto::ChannelMessage { @@ -716,7 +716,7 @@ impl Server { let messages = self .app_state .db - .get_recent_channel_messages( + .get_channel_messages( channel_id, MESSAGE_COUNT_PER_PAGE, Some(MessageId::from_proto(request.payload.before_message_id)),