Skip to content

Commit

Permalink
#2110 Mark alert updated by MISP unread
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 19, 2021
1 parent cf13f69 commit 9777ced
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class MispImportSrv @Inject() (
.map(ra => (ra.alert, None, ra.toJson.asInstanceOf[JsObject]))
case Some(richAlert) =>
logger.debug(s"Event ${client.name}#${event.id} have already been imported for organisation ${organisation.name}, updating the alert")
val (updatedAlertTraversal, updatedFields) = (alertSrv.get(richAlert.alert), JsObject.empty)
val (updatedAlertTraversal, updatedFields) = (alertSrv.get(richAlert.alert).update(_.read, false), Json.obj("read" -> false))
.when(richAlert.title != alert.title)(_.update(_.title, alert.title), _ + ("title" -> JsString(alert.title)))
.when(richAlert.lastSyncDate != alert.lastSyncDate)(
_.update(_.lastSyncDate, alert.lastSyncDate),
Expand Down

0 comments on commit 9777ced

Please sign in to comment.