From d9f061281940c4fe81506f7ea1e4534f27ad8cfd Mon Sep 17 00:00:00 2001 From: WittF Date: Sat, 24 Jan 2026 06:38:46 +0000 Subject: [PATCH] fix(share): add more social media bot user agents Add facebookcatalog, meta-externalagent, pinterestbot and organize bot list with comments by platform. --- pkg/util/user_agent.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkg/util/user_agent.go b/pkg/util/user_agent.go index 5355ca34..5e996409 100644 --- a/pkg/util/user_agent.go +++ b/pkg/util/user_agent.go @@ -5,14 +5,25 @@ import "strings" // IsSocialMediaBot checks if the User-Agent belongs to a social media crawler. func IsSocialMediaBot(ua string) bool { bots := []string{ + // Meta (Facebook, Instagram, WhatsApp) "facebookexternalhit", + "facebookcatalog", + "facebot", + "meta-externalagent", + // Twitter/X "twitterbot", + // LinkedIn "linkedinbot", - "whatsapp", - "slackbot", + // Discord "discordbot", + // Telegram "telegrambot", - "facebot", + // Slack + "slackbot", + // WhatsApp + "whatsapp", + // Pinterest + "pinterestbot", } ua = strings.ToLower(ua) for _, bot := range bots {