X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/48d7bce28b18ecef4c52c98821675605464cecb9..add3cf6416e33c24331fd1e90e99284f44d2aae2:/whatsapp_groups.go?ds=inline diff --git a/whatsapp_groups.go b/whatsapp_groups.go index 4d6c7e5..6e9bed3 100644 --- a/whatsapp_groups.go +++ b/whatsapp_groups.go @@ -9,9 +9,9 @@ import ( ) const ( - // whatsappGroupsLookupTime is the longest time of a read of group + // whatsappGroupLookupTimeout is the longest time of a read of group // names. - whatsappGroupsLookupTime = 10 * time.Second + whatsappGroupLookupTimeout = 10 * time.Second // whatsappGroupsRefresh is the shortest time between two reads of the // groups from WhatsApp for a group with no name. @@ -81,7 +81,7 @@ func (g *WhatsAppGroups) read(ctx context.Context, link WhatsAppLink) bool { return false } - ctx, cancel := context.WithTimeout(ctx, whatsappGroupsLookupTime) + ctx, cancel := context.WithTimeout(ctx, whatsappGroupLookupTimeout) defer cancel() groups, err := link.client.GetJoinedGroups(ctx)