summaryrefslogtreecommitdiff
path: root/lib/plugins/link/quirks.ex
blob: af259a27295fc600d1cebf749466ef797ff77492 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
defmodule Nola.Plugins.Link.Quirks do
  # def uri(%URI{host: "x.com"} = uri) do
  #  %URI{uri | host: "vxtwitter.com"}
  # end

  def uri(url) do
    url
  end

  def user_agent(host)
      when host in [
             "x.com",
             "vxtwitter.com",
             "fxtwitter.com",
             "instagram.com",
             "facebook.com",
             "xnstagram.com",
             "ddinstagram.com"
           ] do
    "TelegramBot (like TwitterBot)"
  end

  def user_agent(_host) do
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
  end
end