  The recent observation of high-energy neutrinos from the 2017 flare of the
blazar TXS~0506+056, together with counterparts across the whole
electromagnetic spectrum, opens up new possibilities for investigating the
properties of this class of objects as well as the traversed medium.
Propagation effects such as the attenuation of the very-high-energy gamma-ray
component by the extragalactic background light are well known, and usually
taken into account when fitting spectral energy distributions of objects. Other
effects such as those of intergalactic magnetic fields are, however, often
neglected. In this work, we present a comprehensive study of the influence of
these fields and the extragalactic background light on the determination of the
intrinsic gamma-ray spectrum of this blazar.
