This commit is contained in:
Cubicroot 2021-06-11 10:21:48 +02:00
parent 975c0a246b
commit c5e4669fda
2 changed files with 9 additions and 4 deletions

View file

@ -82,10 +82,15 @@ func (d *Dispatcher) DeleteNotification(a *model.Application, n *model.DeleteNot
if val, ok := deleteMessage.Content["body"]; ok {
body, ok := val.(string)
if ok {
oldBody = body
oldFormattedBody = body
if !ok {
log.Println("Event does not have a body")
return api.ErrorMessageNotFound
}
oldBody = body
oldFormattedBody = body
} else {
log.Println("Message to delete has wrong format")
return api.ErrorMessageNotFound