ggg
This commit is contained in:
parent
dac3592e2a
commit
8da353545e
@ -216,7 +216,7 @@ func WebhookHandler(db *gorm.DB) http.HandlerFunc {
|
||||
MessageID: msgID,
|
||||
Type: typeMsg,
|
||||
Content: content,
|
||||
Direction: "inbound",
|
||||
Direction: "Entrant",
|
||||
})
|
||||
|
||||
credit := MessageTypeCreditCost[typeMsg]
|
||||
@ -243,7 +243,7 @@ func extractMessageContent(m map[string]interface{}) string {
|
||||
t := m["type"].(string)
|
||||
switch t {
|
||||
case "text":
|
||||
return m["text"].(map[string]interface{})["body"].(string)
|
||||
return m["Message reçu"].(map[string]interface{})["body"].(string)
|
||||
case "image", "video", "audio", "document", "sticker":
|
||||
return m[t].(map[string]interface{})["id"].(string)
|
||||
case "interactive":
|
||||
@ -523,8 +523,8 @@ func HandleTemplateTest(db *gorm.DB) http.HandlerFunc {
|
||||
MessageID: messageID,
|
||||
Type: "template",
|
||||
Content: description,
|
||||
Direction: "outbound",
|
||||
Status: "sent",
|
||||
Direction: "Sortant",
|
||||
Status: "Envoyé",
|
||||
})
|
||||
|
||||
w.WriteHeader(resp.StatusCode)
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
|
||||
{{ if eq .User.Role "ADMIN" }}
|
||||
<li><a href="/admin/user">👤 Utilisateurs</a></li>
|
||||
<li><a href="/test/send">📤 Test envoi</a></li>
|
||||
<li><a href="/test/send2">📤 Test envoi template</a></li>
|
||||
<li><a href="/apidoc">Api doc </a></li>
|
||||
<!-- <li><a href="/test/send">📤 Test envoi</a></li> -->
|
||||
<li><a href="/test/send2">📤 Test envoi via un template</a></li>
|
||||
<li><a href="/apidoc">📚 API Doc</a></li>
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user