)
const (
+ // whatsappGroupsLookupTime is the longest time of a read of group
+ // names.
+ whatsappGroupsLookupTime = 10 * time.Second
+
// whatsappGroupsRefresh is the shortest time between two reads of the
// groups from WhatsApp for a group with no name.
whatsappGroupsRefresh = time.Minute
return false
}
- ctx, cancel := context.WithTimeout(ctx, whatsappLookupTime)
+ ctx, cancel := context.WithTimeout(ctx, whatsappGroupsLookupTime)
defer cancel()
groups, err := link.client.GetJoinedGroups(ctx)