Skip to content

Commit

Permalink
Number Issue Disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
keyurboss committed Aug 13, 2024
1 parent e3cdc4e commit 1ebd87e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions apis/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ func SendMediaFileWithBase64(c *fiber.Ctx) error {
func SendMessage(c *fiber.Ctx) error {
body := new(apiSendMessage)
c.BodyParser(body)

if err := utility.ValidateReqInput(body); err != nil {
return err
}
Expand Down
15 changes: 7 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"bufio"
"encoding/json"
"errors"
"fmt"
Expand All @@ -27,13 +26,13 @@ var app *fiber.App
func main() {
println(version)

if time.Now().Unix() > 1719562963 {
println("Please Update The Binary From Keyur Shah")
println("Press Any Key To Close")
input := bufio.NewScanner(os.Stdin)
input.Scan()
return
}
// if time.Now().Unix() > 1719562963 {
// println("Please Update The Binary From Keyur Shah")
// println("Press Any Key To Close")
// input := bufio.NewScanner(os.Stdin)
// input.Scan()
// return
// }

env.CurrentDirectory = FindAndReturnCurrentDir()
go func() {
Expand Down
6 changes: 5 additions & 1 deletion whatsapp/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,14 @@ func (connection *WhatsappConnection) sendMediaFile(to []string, fileByte []byte
FileLength: &resp.FileLength,
},
}
println("finished uploading")
if strings.Contains(extensionName, "pdf") {
println("PDF to thumb")
thumb, err := utility.ExtractFirstPage(fileByte)
if err != nil && len(thumb) > 0 {
if err == nil && len(thumb) > 0 {
docProto.DocumentMessage.JpegThumbnail = thumb
} else {
println(err.Error())
}
}
}
Expand Down

0 comments on commit 1ebd87e

Please sign in to comment.