From d411ab86dc574148dc72582b715641dab9d4f0b6 Mon Sep 17 00:00:00 2001 From: Paul Lindner Date: Mon, 13 Sep 2021 17:14:30 -0700 Subject: [PATCH] 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 --- utils/utils.go | 1 + utils/utils_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/utils/utils.go b/utils/utils.go index 14767cdac..a7567529f 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -75,6 +75,7 @@ func IsUserAgentABot(userAgent string) bool { "mastodon", "pleroma", "applebot", + "whatsapp", } for _, botString := range botStrings { diff --git a/utils/utils_test.go b/utils/utils_test.go index dfa204848..ababc083a 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -7,6 +7,7 @@ func TestUserAgent(t *testing.T) { "Pleroma 1.0.0-1168-ge18c7866-pleroma-dot-site; https://pleroma.site info@pleroma.site", "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)", + "WhatsApp", } for _, agent := range testAgents {