Skip to content

[Bugfix] Group name not cleared from send notification form when deleted

When deleting the group name from the direct notification form field, it will not clear it from the request in a certain situation.

Steps to reproduce:

  • Create a channel with the direct notification ability
  • Write a notification with title and content
  • Set the first option of Direct notification
  • Write in a non-existing group name in the 'grappa group' text field.
  • Send notification:
{
"target":"f1f0d230-6648-47ae-be20-71cc7eed522b",
"summary":"test",
"priority":"NORMAL",
"body":"<p>test</p>\n",
"imgUrl":"",
"link":"",
"sendAt":null,
"targetUsers":null,
"targetGroups":[{"groupIdentifier":"somegroup"}],
"intersection":true,
"source":"WEB"
}
  • Receive an error:
{
"name":"BadRequestError",
"message":"Grappa group not found: somegroup",
"stack":"Error: \n    at new HttpError ..."
}
  • Delete wrong group name from text field
  • Write a target member on the first text field for targeted users (a proper one)
  • Send notification: Expected the payload to reflect the form fields. Result:
{
"target":"f1f0d230-6648-47ae-be20-71cc7eed522b",
"summary":"test",
"priority":"NORMAL",
"body":"<p>test</p>\n",
"imgUrl":"",
"link":"",
"sendAt":null,
"targetUsers":[{"email":"jlopesda"}],
"targetGroups":[{"groupIdentifier":"somegroup"}],
"intersection":true,
"source":"WEB"
}
  • Receive the same "Grappa group not found: somegroup" error

The groupname is not cleared from the payload.

image

image