In modify_network handler, before emitting a LocationMfaFlowsAssigned event, check if the flows really changed:
// TODO: also check new-old assignments equality before emitting
if update_mfa_assignments {
appstate.emit_event(ApiEvent {
context: context.clone(),
event: Box::new(ApiEventType::LocationMfaFlowsAssigned {
location_id: network.id,
location_name: network.name.clone(),
assignments: LocationMfaFlowAssignment::snapshot(&mfa_assignments),
}),
})?;
}
In
modify_networkhandler, before emitting aLocationMfaFlowsAssignedevent, check if the flows really changed: