commit
80f4e16fc2
13
telegram.go
13
telegram.go
@ -203,8 +203,19 @@ func mgWebhookHandler(w http.ResponseWriter, r *http.Request) {
|
||||
logger.Debugf("mgWebhookHandler sent %v", msg)
|
||||
}
|
||||
|
||||
rsp, err := json.Marshal(map[string]string{"external_message_id": strconv.Itoa(msg.MessageID)})
|
||||
if err != nil {
|
||||
raven.CaptureErrorAndWait(err, nil)
|
||||
logger.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("mgWebhookHandler sent response %v", rsp)
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write([]byte("Message sent"))
|
||||
w.Write(rsp)
|
||||
}
|
||||
|
||||
if msg.Type == "message_updated" {
|
||||
|
Loading…
Reference in New Issue
Block a user