We construct a version of Dijkgraaf–Witten theory based on a compact abelian Lie group within the formalism of Turaev’s homotopy quantum field theory. As an application we show that the $2+1$-dimensional theory based on $\rm U(1)$ classifies lens spaces up to homotopy type.