This commit is contained in:
2020-07-28 17:25:45 +00:00
parent 27ecaba423
commit 5e8cf84806
4 changed files with 22 additions and 16 deletions

View File

@@ -181,11 +181,13 @@ namespace AyaNova.Api.Controllers
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
var message = $"{UserNameFromContext.Name(HttpContext.Items)}: \"{notifyDirectMessage.Message}\"";
foreach (long l in notifyDirectMessage.Users)
{
if (l != 0)
await NotifyEventProcessor.AddGeneralNotifyEvent(NotifyEventType.GeneralNotification, message, null, l);
await NotifyEventProcessor.AddGeneralNotifyEvent(
NotifyEventType.GeneralNotification, notifyDirectMessage.Message, UserNameFromContext.Name(HttpContext.Items), null, l
);
}
return NoContent();