]> git.giacomolli.uk - onechat/blobdiff - whatsapp_groups.go
Name the tools that check the Go rules
[onechat] / whatsapp_groups.go
index c8d066a510188877584e1849f6a0a2299fef0289..56676e5264fb363e709b2785bd095c6c9d42c012 100644 (file)
@@ -49,6 +49,7 @@ type WhatsAppGroups struct {
 // again, at most once in whatsappGroupsRefresh.
 func (g *WhatsAppGroups) name(ctx context.Context, link WhatsAppLink, id string) string {
        g.mutex.Lock()
+
        name, found := g.names[id]
        fresh := time.Since(g.triedAt) < whatsappGroupsRefresh
        g.mutex.Unlock()
@@ -57,6 +58,7 @@ func (g *WhatsAppGroups) name(ctx context.Context, link WhatsAppLink, id string)
                g.read(ctx, link)
 
                g.mutex.Lock()
+
                name, found = g.names[id]
                g.mutex.Unlock()
        }