mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 22:31:09 +03:00
Adjust allowed bot list to allow for link previews in WhatsApp and Signal (#1401)
See signalapp/Signal-Android#10060 for how Signal uses their UA Fixes #1392
This commit is contained in:
parent
9e33a1bff2
commit
d411ab86dc
2 changed files with 2 additions and 0 deletions
|
@ -75,6 +75,7 @@ func IsUserAgentABot(userAgent string) bool {
|
||||||
"mastodon",
|
"mastodon",
|
||||||
"pleroma",
|
"pleroma",
|
||||||
"applebot",
|
"applebot",
|
||||||
|
"whatsapp",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, botString := range botStrings {
|
for _, botString := range botStrings {
|
||||||
|
|
|
@ -7,6 +7,7 @@ func TestUserAgent(t *testing.T) {
|
||||||
"Pleroma 1.0.0-1168-ge18c7866-pleroma-dot-site; https://pleroma.site info@pleroma.site",
|
"Pleroma 1.0.0-1168-ge18c7866-pleroma-dot-site; https://pleroma.site info@pleroma.site",
|
||||||
"Mastodon 1.2.3 Bot",
|
"Mastodon 1.2.3 Bot",
|
||||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)",
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)",
|
||||||
|
"WhatsApp",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, agent := range testAgents {
|
for _, agent := range testAgents {
|
||||||
|
|
Loading…
Reference in a new issue