fixes after merge

pull/3605/head
phiresky 2023-08-24 16:34:19 +00:00
parent 10e494020c
commit 9c793472fb
3 changed files with 865 additions and 729 deletions

1588
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ use activitypub_federation::{
config::Data,
traits::{Actor, Object},
};
use chrono::NaiveDateTime;
use chrono::{DateTime, NaiveDateTime, Utc};
use lemmy_api_common::context::LemmyContext;
use lemmy_utils::error::LemmyError;
use reqwest::Url;
@ -33,7 +33,7 @@ impl Object for SiteOrCommunityOrUser {
type Kind = SiteOrPersonOrGroup;
type Error = LemmyError;
fn last_refreshed_at(&self) -> Option<NaiveDateTime> {
fn last_refreshed_at(&self) -> Option<DateTime<Utc>> {
Some(match self {
SiteOrCommunityOrUser::Site(p) => p.last_refreshed_at,
SiteOrCommunityOrUser::UserOrCommunity(p) => p.last_refreshed_at()?,

View File

@ -6,7 +6,7 @@ use crate::{
utils::{functions::lower, get_conn, naive_now, now, DbPool},
};
use diesel::{
dsl::{count_star, insert_into, now},
dsl::{count_star, insert_into},
result::Error,
sql_types::{Nullable, Timestamptz},
ExpressionMethods,