Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nocodeleaks committed May 21, 2024
1 parent ab194dc commit e906d18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controllers/api_handlers+InviteController.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
models "github.com/nocodeleaks/quepasa/models"
)

//region CONTROLLER - INIVITE
//region CONTROLLER - INVITE

func InviteController(w http.ResponseWriter, r *http.Request) {

// setting default reponse type as json
// setting default response type as json
w.Header().Set("Content-Type", "application/json")

response := &models.QpInviteResponse{}
Expand All @@ -33,7 +33,7 @@ func InviteController(w http.ResponseWriter, r *http.Request) {
}

if !strings.HasSuffix(chatId, "@g.us") {
err = fmt.Errorf("chatId must be a valid and formated (@g.us) group id")
err = fmt.Errorf("chatId must be a valid and formatted (@g.us) group id")
response.ParseError(err)
RespondInterface(w, response)
return
Expand Down
3 changes: 3 additions & 0 deletions src/models/qp_whatsapp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@ func (source *QpWhatsappServer) GetProfilePicture(wid string, knowingId string)
logger := source.GetLogger()
logger.Debugf("getting info about profile picture for: %s, with id: %s", wid, knowingId)

// future implement a rate control here, high volume of requests causing bans
// studying rates ...

return source.connection.GetProfilePicture(wid, knowingId)
}

Expand Down

0 comments on commit e906d18

Please sign in to comment.