Skip to content

Commit

Permalink
Fix Slack references
Browse files Browse the repository at this point in the history
It's now sent in lower-case; just make the entire lookup lower-case.
  • Loading branch information
arp242 committed Nov 18, 2024
1 parent c66f5c2 commit c059188
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ var groups = map[string]string{

"org.telegram.messenger": "Telegram Messenger",

"com.Slack": "Slack Chat",
// Slack
"com.slack": "Slack Chat",

// Baidu
"baidu.com": "Baidu",
Expand Down Expand Up @@ -176,10 +177,10 @@ func cleanRefURL(ref string, refURL *url.URL) (string, bool) {
return "Yahoo", true
}

if g, ok := groups[refURL.Host]; ok {
if g, ok := groups[strings.ToLower(refURL.Host)]; ok {
return g, true
}
if g, ok := groups[ref]; ok {
if g, ok := groups[strings.ToLower(ref)]; ok {
return g, true
}

Expand Down

0 comments on commit c059188

Please sign in to comment.