websocket_id: Option<ConnectionId>,
) -> Result<PrivateMessageResponse, LemmyError> {
let data: &EditPrivateMessage = self;
- let local_user_view = get_local_user_view_from_jwt(&data.auth, context.pool()).await?;
+ let local_user_view =
+ get_local_user_view_from_jwt(&data.auth, context.pool(), context.secret()).await?;
// Checking permissions
let private_message_id = data.private_message_id;
}
// Doing the update
- let content_slurs_removed = remove_slurs(&data.content);
+ let content_slurs_removed = remove_slurs(&data.content, &context.settings().slur_regex());
let private_message_id = data.private_message_id;
let updated_private_message = blocking(context.pool(), move |conn| {
PrivateMessage::update_content(conn, private_message_id, &content_slurs_removed)