Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-01-15 20:51:40 -05:00
parent 3384d81832
commit db7f77d163
2 changed files with 38 additions and 35 deletions

70
backend/Cargo.lock generated
View File

@ -410,7 +410,7 @@ checksum = "3818dfca4b0cb5211a659bbcbb94225b7127407b2b135e650d717bfb78ab10d3"
dependencies = [ dependencies = [
"cookie 0.14.3", "cookie 0.14.3",
"idna 0.2.0", "idna 0.2.0",
"log 0.4.11", "log 0.4.13",
"publicsuffix", "publicsuffix",
"serde", "serde",
"serde_json", "serde_json",
@ -750,9 +750,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.9" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e37c1a51b037b80922864b8eed90692c5cd8abd4c71ce49b77146caa47f3253b" checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500"
[[package]] [[package]]
name = "fxhash" name = "fxhash"
@ -877,7 +877,7 @@ version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b" checksum = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
"mac", "mac",
"markup5ever", "markup5ever",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -1108,14 +1108,14 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
] ]
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.11" version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2"
dependencies = [ dependencies = [
"cfg-if 0.1.10", "cfg-if 0.1.10",
] ]
@ -1132,7 +1132,7 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aae38d669396ca9b707bfc3db254bc382ddb94f57cc5c235f34623a669a01dab" checksum = "aae38d669396ca9b707bfc3db254bc382ddb94f57cc5c235f34623a669a01dab"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
"phf", "phf",
"phf_codegen", "phf_codegen",
"serde", "serde",
@ -1190,11 +1190,11 @@ dependencies = [
"encoding_rs_io", "encoding_rs_io",
"futures-io", "futures-io",
"hex", "hex",
"log 0.4.11", "log 0.4.13",
"mime 0.3.16", "mime 0.3.16",
"paseto", "paseto",
"prometheus", "prometheus",
"rand 0.8.1", "rand 0.8.2",
"readability-fork", "readability-fork",
"ring", "ring",
"rocket", "rocket",
@ -1212,7 +1212,7 @@ dependencies = [
"tracing-log", "tracing-log",
"tracing-subscriber", "tracing-subscriber",
"twapi-ureq", "twapi-ureq",
"ureq 2.0.0", "ureq 2.0.1",
"url 2.2.0", "url 2.2.0",
] ]
@ -1284,7 +1284,7 @@ dependencies = [
"iovec", "iovec",
"kernel32-sys", "kernel32-sys",
"libc", "libc",
"log 0.4.11", "log 0.4.13",
"miow", "miow",
"net2", "net2",
"slab", "slab",
@ -1298,7 +1298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
dependencies = [ dependencies = [
"lazycell", "lazycell",
"log 0.4.11", "log 0.4.13",
"mio", "mio",
"slab", "slab",
] ]
@ -1579,9 +1579,9 @@ dependencies = [
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.3" version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba36e0a6cc5a4c645073f4984f1ed55d09f5857d4de7c14550baa81a39ef5a17" checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827"
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
@ -1711,7 +1711,7 @@ version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
"parking_lot", "parking_lot",
"scheduled-thread-pool", "scheduled-thread-pool",
] ]
@ -1761,9 +1761,9 @@ dependencies = [
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.8.1" version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c24fcd450d3fa2b592732565aa4f17a27a61c65ece4726353e000939b0edee34" checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha 0.3.0", "rand_chacha 0.3.0",
@ -1936,7 +1936,7 @@ checksum = "4fc7e5d6aaa32ace6893ae8a1875688ca7b07d6c2428ae88e704c3623c8866e9"
dependencies = [ dependencies = [
"atty", "atty",
"base64 0.12.3", "base64 0.12.3",
"log 0.4.11", "log 0.4.13",
"memchr", "memchr",
"num_cpus", "num_cpus",
"pear", "pear",
@ -1971,7 +1971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9465babd59cfb360669b60431db510f3dc3268d51ccd69fc9264e626681e596a" checksum = "9465babd59cfb360669b60431db510f3dc3268d51ccd69fc9264e626681e596a"
dependencies = [ dependencies = [
"diesel", "diesel",
"log 0.4.11", "log 0.4.13",
"notify", "notify",
"r2d2", "r2d2",
"rocket", "rocket",
@ -1999,7 +1999,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea20696dc46308d0ca06222905fe38e02b8e46c087af9c82ea85cdc386271076" checksum = "ea20696dc46308d0ca06222905fe38e02b8e46c087af9c82ea85cdc386271076"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
"regex", "regex",
"rocket", "rocket",
"serde", "serde",
@ -2077,7 +2077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b"
dependencies = [ dependencies = [
"base64 0.13.0", "base64 0.13.0",
"log 0.4.11", "log 0.4.13",
"ring", "ring",
"sct", "sct",
"webpki", "webpki",
@ -2173,7 +2173,7 @@ dependencies = [
"cssparser", "cssparser",
"derive_more", "derive_more",
"fxhash", "fxhash",
"log 0.4.11", "log 0.4.13",
"matches", "matches",
"phf", "phf",
"phf_codegen", "phf_codegen",
@ -2200,9 +2200,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.118" version = "1.0.119"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" checksum = "9bdd36f49e35b61d49efd8aa7fc068fd295961fd2286d0b2ee9a4c7a14e99cc3"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -2213,7 +2213,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0bf1ba0696ccf0872866277143ff1fd14d22eec235d2b23702f95e6660f7dfa" checksum = "f0bf1ba0696ccf0872866277143ff1fd14d22eec235d2b23702f95e6660f7dfa"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
"serde", "serde",
"thiserror", "thiserror",
"xml-rs", "xml-rs",
@ -2221,9 +2221,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.118" version = "1.0.119"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" checksum = "552954ce79a059ddd5fd68c271592374bd15cab2274970380c000118aeffe1cd"
dependencies = [ dependencies = [
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
"quote 1.0.8", "quote 1.0.8",
@ -2655,7 +2655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9" checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"log 0.4.11", "log 0.4.13",
"tracing-core", "tracing-core",
] ]
@ -2827,7 +2827,7 @@ dependencies = [
"chunked_transfer", "chunked_transfer",
"cookie 0.14.3", "cookie 0.14.3",
"cookie_store", "cookie_store",
"log 0.4.11", "log 0.4.13",
"once_cell", "once_cell",
"qstring", "qstring",
"rustls", "rustls",
@ -2840,14 +2840,14 @@ dependencies = [
[[package]] [[package]]
name = "ureq" name = "ureq"
version = "2.0.0" version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e562326b32e3766fee6a4890b62489b4b095e94ac07232cfea631668002c19d7" checksum = "96014ded8c85822677daee4f909d18acccca744810fd4f8ffc492c284f2324bc"
dependencies = [ dependencies = [
"base64 0.13.0", "base64 0.13.0",
"chunked_transfer", "chunked_transfer",
"encoding_rs", "encoding_rs",
"log 0.4.11", "log 0.4.13",
"once_cell", "once_cell",
"rustls", "rustls",
"serde", "serde",
@ -2945,7 +2945,7 @@ checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
"log 0.4.11", "log 0.4.13",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
"quote 1.0.8", "quote 1.0.8",
"syn 1.0.58", "syn 1.0.58",
@ -3081,7 +3081,7 @@ version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b1b52e6e8614d4a58b8e70cf51ec0cc21b256ad8206708bcff8139b5bbd6a59" checksum = "0b1b52e6e8614d4a58b8e70cf51ec0cc21b256ad8206708bcff8139b5bbd6a59"
dependencies = [ dependencies = [
"log 0.4.11", "log 0.4.13",
"mac", "mac",
"markup5ever", "markup5ever",
"time 0.1.44", "time 0.1.44",

View File

@ -117,6 +117,9 @@ pub fn lookup_target(conn: MainDatabase, target: String) -> Result<Json<Vec<WebM
.map_err(Error::Database)? .map_err(Error::Database)?
.into_iter() .into_iter()
.map(Into::into) .map(Into::into)
.filter(|wm| {
!wm.source.contains("like/twitter") || !wm.source.contains("like/mastodon")
})
.collect::<Vec<WebMention>>(), .collect::<Vec<WebMention>>(),
)) ))
} }