  We discuss the effects of synchrotron self-absorption in the prompt emission
from the reverse shock of GRB afterglows occurring in a dense environment, such
as the wind of a massive stellar progenitor or a dense ISM in early galaxies.
We point out that, when synchrotron losses dominate over inverse Compton
losses, the higher self-absorption frequency in a dense environment implies a
bump in the reverse shock emission spectrum, which can result in a more complex
optical/IR light curve than previously thought. This bump is prominent
especially if the burst ejecta is highly magnetized. In the opposite case of
low magnetization, inverse Compton losses lead to a prompt X-ray flare. These
effects give a possible new diagnostic for the magnetic energy density in the
fireball, and for the presence of a dense environment.
