// 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()
g.read(ctx, link)
g.mutex.Lock()
+
name, found = g.names[id]
g.mutex.Unlock()
}
groups, err := link.client.GetJoinedGroups(ctx)
if err != nil {
- g.logger.Printf("group names can be missing, because the list of groups did not load: %s", whatsappRedact(link.own, err.Error()))
+ g.logger.Printf("group list failed: %s", whatsappRedact(link.own, err.Error()))
}
g.mutex.Lock()