  Several modified gravity theories predict a possible time variation of the
propagation speed of gravitational waves (GW) which could be tested with
multimessenger astronomy. For this purpose we derive the relation between the
redshift dependence of the propagation speed of GWs and the time delay between
the detection of GWs and electromagnetic waves (EMWs) emitted by the same
source. For theories with Einstein frame minimal matter-gravity coupling (EMC)
the propagation speed of GWs can be jointly constrained by the time delay
between GWs and EWs and the GW-EMW luminosity distance ratio, allowing to
derive a consistency relation between these two observables. The event GW
170817 and its EM counterpart satisfy the consistency condition, confirming the
EMC, and allow to set strong constraints on the time variation of the GWs
speed.
