From 541f72ab38c1965ad786eef8e91fd72f954f979c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 10 Oct 2024 14:15:18 +0300 Subject: [PATCH] Drop reports from Indonesia --- submit.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/submit.go b/submit.go index 481fb1f..fa15710 100644 --- a/submit.go +++ b/submit.go @@ -386,6 +386,14 @@ func (s *submitServer) parseRequest(ctx context.Context, w http.ResponseWriter, _, _ = w.Write([]byte("{}")) return nil } + // TODO remove this after the reports calm down + if p.Data["telephony_network_country_iso"] == "id" && p.AppName == "bleeper" { + log.Info().Str("user_text", p.UserText).Msg("Dropping report from Indonesia") + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + _, _ = w.Write([]byte("{}")) + return nil + } userID, hasUserID := p.Data["user_id"] delete(p.Data, "user_id")