Skip to content

Commit

Permalink
Merge pull request #213 from LemmyNet/main
Browse files Browse the repository at this point in the history
[pull] master from LemmyNet:main
  • Loading branch information
pull[bot] authored Dec 21, 2024
2 parents 20eb60e + 7585aac commit 225eaf7
Show file tree
Hide file tree
Showing 14 changed files with 344 additions and 430 deletions.
74 changes: 28 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ diesel-async = "0.5.1"
serde = { version = "1.0.215", features = ["derive"] }
serde_with = "3.9.0"
actix-web = { version = "4.9.0", default-features = false, features = [
"macros",
"rustls-0_23",
"compress-brotli",
"compress-gzip",
"compress-zstd",
"cookies",
"macros",
"rustls-0_23",
] }
tracing = "0.1.40"
tracing-actix-web = { version = "0.7.10", default-features = false }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
url = { version = "2.5.3", features = ["serde"] }
reqwest = { version = "0.12.7", default-features = false, features = [
"json",
"blocking",
"gzip",
"json",
"rustls-tls",
] }
reqwest-middleware = "0.3.3"
Expand All @@ -126,17 +126,15 @@ clokwerk = "0.4.0"
doku = { version = "0.21.1", features = ["url-2"] }
bcrypt = "0.15.1"
chrono = { version = "0.4.38", features = [
"serde",
"now",
"serde",
], default-features = false }
serde_json = { version = "1.0.132", features = ["preserve_order"] }
base64 = "0.22.1"
uuid = { version = "1.11.0", features = ["serde"] }
async-trait = "0.1.83"
captcha = "0.0.9"
anyhow = { version = "1.0.93", features = [
"backtrace",
] } # backtrace is on by default on nightly, but not stable rust
anyhow = { version = "1.0.93", features = ["backtrace"] }
diesel_ltree = "0.3.1"
serial_test = "3.2.0"
tokio = { version = "1.41.1", features = ["full"] }
Expand All @@ -149,7 +147,6 @@ futures = "0.3.31"
http = "1.1"
rosetta-i18n = "0.1.3"
ts-rs = { version = "10.0.0", features = [
"serde-compat",
"chrono-impl",
"no-serde-warnings",
"url-impl",
Expand Down Expand Up @@ -185,7 +182,6 @@ tracing = { workspace = true }
tracing-actix-web = { workspace = true }
tracing-subscriber = { workspace = true }
url = { workspace = true }
reqwest = { workspace = true }
reqwest-middleware = { workspace = true }
reqwest-tracing = { workspace = true }
clokwerk = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/api_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ urlencoding = { workspace = true }
mime = { version = "0.3.17", optional = true }
mime_guess = "2.0.5"
infer = "0.16.0"
webpage = { version = "2.0", default-features = false, features = [
webpage = { version = "2.0", default-features = false, optional = true, features = [
"serde",
], optional = true }
] }
encoding_rs = { version = "0.8.35", optional = true }
jsonwebtoken = { version = "9.3.0", optional = true }

Expand Down
6 changes: 3 additions & 3 deletions crates/db_schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ activitypub_federation = { workspace = true, optional = true }
lemmy_utils = { workspace = true, optional = true }
bcrypt = { workspace = true, optional = true }
diesel = { workspace = true, features = [
"postgres",
"chrono",
"postgres",
"serde_json",
"uuid",
], optional = true }
diesel-derive-newtype = { workspace = true, optional = true }
diesel-derive-enum = { workspace = true, optional = true }
diesel_migrations = { workspace = true, optional = true }
diesel-async = { workspace = true, features = [
"postgres",
"deadpool",
"postgres",
], optional = true }
regex = { workspace = true, optional = true }
diesel_ltree = { workspace = true, optional = true }
async-trait = { workspace = true }
tracing = { workspace = true }
deadpool = { version = "0.12.1", features = ["rt_tokio_1"], optional = true }
deadpool = { version = "0.12.1", optional = true, features = ["rt_tokio_1"] }
ts-rs = { workspace = true, optional = true }
futures-util = { workspace = true }
tokio = { workspace = true, optional = true }
Expand Down
36 changes: 18 additions & 18 deletions crates/db_schema/replaceable_schema/utils.sql
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,26 @@ BEGIN
AND pe.bot_account = FALSE
UNION
SELECT
pl.person_id,
pa.person_id,
p.community_id
FROM
post_like pl
INNER JOIN post p ON pl.post_id = p.id
INNER JOIN person pe ON pl.person_id = pe.id
post_actions pa
INNER JOIN post p ON pa.post_id = p.id
INNER JOIN person pe ON pa.person_id = pe.id
WHERE
pl.published > ('now'::timestamp - i::interval)
pa.liked > ('now'::timestamp - i::interval)
AND pe.bot_account = FALSE
UNION
SELECT
cl.person_id,
ca.person_id,
p.community_id
FROM
comment_like cl
INNER JOIN comment c ON cl.comment_id = c.id
comment_actions ca
INNER JOIN comment c ON ca.comment_id = c.id
INNER JOIN post p ON c.post_id = p.id
INNER JOIN person pe ON cl.person_id = pe.id
INNER JOIN person pe ON ca.person_id = pe.id
WHERE
cl.published > ('now'::timestamp - i::interval)
ca.liked > ('now'::timestamp - i::interval)
AND pe.bot_account = FALSE) a
GROUP BY
community_id;
Expand Down Expand Up @@ -244,22 +244,22 @@ BEGIN
AND pe.bot_account = FALSE
UNION
SELECT
pl.person_id
pa.person_id
FROM
post_like pl
INNER JOIN person pe ON pl.person_id = pe.id
post_actions pa
INNER JOIN person pe ON pa.person_id = pe.id
WHERE
pl.published > ('now'::timestamp - i::interval)
pa.liked > ('now'::timestamp - i::interval)
AND pe.local = TRUE
AND pe.bot_account = FALSE
UNION
SELECT
cl.person_id
ca.person_id
FROM
comment_like cl
INNER JOIN person pe ON cl.person_id = pe.id
comment_actions ca
INNER JOIN person pe ON ca.person_id = pe.id
WHERE
cl.published > ('now'::timestamp - i::interval)
ca.liked > ('now'::timestamp - i::interval)
AND pe.local = TRUE
AND pe.bot_account = FALSE) a;
RETURN count_;
Expand Down
4 changes: 2 additions & 2 deletions crates/db_views_actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ full = [
[dependencies]
lemmy_db_schema = { workspace = true }
diesel = { workspace = true, features = [
"postgres",
"chrono",
"postgres",
"serde_json",
], optional = true }
diesel-async = { workspace = true, features = [
"postgres",
"deadpool",
"postgres",
], optional = true }
serde = { workspace = true }
serde_with = { workspace = true }
Expand Down
Loading

0 comments on commit 225eaf7

Please sign in to comment.