|
|
|
@ -73,6 +73,15 @@ func WhatsAppInitClient(device *store.Device, jid string) { |
|
|
|
// Initialize New WhatsApp Client
|
|
|
|
// And Save it to The Map
|
|
|
|
WhatsAppClient[jid] = whatsmeow.NewClient(device, nil) |
|
|
|
|
|
|
|
// Set WhatsApp Client One Message at a Time
|
|
|
|
isOneMessageFlight, err := env.GetEnvBool("WHATSAPP_ONE_MESSAGE_FLIGHT") |
|
|
|
if err != nil { |
|
|
|
// Set Default Value WhatsApp Client One Message at a Time
|
|
|
|
// For Account Safety then Turn it ON by Default
|
|
|
|
isOneMessageFlight = true |
|
|
|
} |
|
|
|
WhatsAppClient[jid].OneMessageAtATime = isOneMessageFlight |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|