utils::local_user_view_from_jwt,
};
use lemmy_db_views::private_message_view::PrivateMessageQuery;
-use lemmy_utils::{error::LemmyError, ConnectionId};
+use lemmy_utils::error::LemmyError;
#[async_trait::async_trait(?Send)]
impl PerformCrud for GetPrivateMessages {
type Response = PrivateMessagesResponse;
- #[tracing::instrument(skip(self, context, _websocket_id))]
+ #[tracing::instrument(skip(self, context))]
async fn perform(
&self,
context: &Data<LemmyContext>,
- _websocket_id: Option<ConnectionId>,
) -> Result<PrivateMessagesResponse, LemmyError> {
let data: &GetPrivateMessages = self;
let local_user_view = local_user_view_from_jwt(data.auth.as_ref(), context).await?;
let limit = data.limit;
let unread_only = data.unread_only;
let mut messages = PrivateMessageQuery::builder()
- .pool(context.pool())
+ .pool(&mut context.pool())
.recipient_id(person_id)
.page(page)
.limit(limit)