kdf;dfldfl
This commit is contained in:
parent
6c4a1aa2b2
commit
0a3c0d219b
@ -333,7 +333,7 @@ func WebhookReceiveHandler(db *gorm.DB) http.HandlerFunc {
|
||||
messages := value["messages"].([]interface{})
|
||||
if len(messages) > 0 {
|
||||
msg := messages[0].(map[string]interface{})
|
||||
from := msg["from"].(string)
|
||||
//from := msg["from"].(string)
|
||||
msgType := msg["type"].(string)
|
||||
msgID := msg["id"].(string)
|
||||
|
||||
@ -354,7 +354,7 @@ func WebhookReceiveHandler(db *gorm.DB) http.HandlerFunc {
|
||||
|
||||
conv := models.Conversation{
|
||||
UserID: user.ID,
|
||||
From: from,
|
||||
From: user.NameClient,
|
||||
To: recipientID,
|
||||
MessageID: msgID,
|
||||
Type: msgType,
|
||||
|
||||
@ -20,7 +20,8 @@ type User struct {
|
||||
UpdatedAt time.Time
|
||||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||||
|
||||
Password string `gorm:"not null"` // hashé avec bcrypt
|
||||
NameClient string `gorm:"not null"`
|
||||
Password string `gorm:"not null"` // hashé avec bcrypt
|
||||
Email string `gorm:"uniqueIndex;not null"`
|
||||
SSOID string `gorm:"uniqueIndex;not null"`
|
||||
Role UserRole `gorm:"type:enum('ADMIN','CLIENT');default:'CLIENT';not null"`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user