summaryrefslogtreecommitdiff
path: root/lib/plugins/link/quirks.ex
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2025-06-26 17:40:23 +0200
committerJordan Bracco <href@random.sh>2025-06-26 17:44:30 +0200
commitc869d17986093efab876a800b4f7b90bdac4c634 (patch)
tree1aa8b045eeed2484d4c9d2275d6298b1f7e5c0a2 /lib/plugins/link/quirks.ex
parentlink: img.debrid-link: fix (diff)
link: reddit: use proxy in handler, rewrite to old reddit otherwise
Diffstat (limited to 'lib/plugins/link/quirks.ex')
-rw-r--r--lib/plugins/link/quirks.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/plugins/link/quirks.ex b/lib/plugins/link/quirks.ex
index af259a2..5acfdac 100644
--- a/lib/plugins/link/quirks.ex
+++ b/lib/plugins/link/quirks.ex
@@ -3,6 +3,12 @@ defmodule Nola.Plugins.Link.Quirks do
# %URI{uri | host: "vxtwitter.com"}
# end
+ # reddit: new reddit don't have titles for pages we don't handle in the reddit module
+ # fallback to old. which has nice titles
+ def uri(%URI{host: reddit} = uri) when reddit in ["www.reddit.com", "reddit.com"] do
+ %URI{uri | host: "old.reddit.com"}
+ end
+
def uri(url) do
url
end