From e413373ea98cb4bc2145e684a8bcf809f554cff9 Mon Sep 17 00:00:00 2001 From: man90 Date: Mon, 18 May 2026 18:42:47 +0200 Subject: [PATCH 1/2] Make GM profileTarget consistent --- scraper/scrapeGuild.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scraper/scrapeGuild.go b/scraper/scrapeGuild.go index f69de43..5ce4145 100644 --- a/scraper/scrapeGuild.go +++ b/scraper/scrapeGuild.go @@ -2,6 +2,7 @@ package scraper import ( "net/http" + "slices" "strconv" "strings" @@ -63,5 +64,15 @@ func scrapeGuild(body *colly.HTMLElement, region, guildName string) { guildProfile.Members = append(guildProfile.Members, member) }) + // Link to master's profile at the top of the page has a different profile target than the one + // in the members list, so replacing it with the one from the members list helps with consistency and cache hits + if guildProfile.Master != nil { + if i := slices.IndexFunc(guildProfile.Members, func(m models.Profile) bool { + return m.FamilyName == guildProfile.Master.FamilyName + }); i != -1 { + guildProfile.Master.ProfileTarget = guildProfile.Members[i].ProfileTarget + } + } + cache.GuildProfiles.AddRecord([]string{region, guildName}, guildProfile, status, body.Request.Ctx.Get("taskId")) } From 7cd2d4e21baffeb83446de02e3d6bb6a897bee21 Mon Sep 17 00:00:00 2001 From: man90 Date: Mon, 18 May 2026 18:43:41 +0200 Subject: [PATCH 2/2] Bump up version number --- handlers/getStatus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/getStatus.go b/handlers/getStatus.go index 5d94136..4864da5 100644 --- a/handlers/getStatus.go +++ b/handlers/getStatus.go @@ -12,7 +12,7 @@ import ( ) var initTime = time.Now() -var version = "1.18.3" +var version = "1.18.4" func getStatus(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(map[string]interface{}{