  We prove a local-global compatibility result in the mod $p$ Langlands program
for $\mathrm{GL}_2(\mathbf{Q}_{p^f})$. Namely, given a global residual
representation $\bar{r}$ that is sufficiently generic at $p$, we prove that the
diagram occurring in the corresponding Hecke eigenspace of completed cohomology
is determined by the restrictions of $\bar{r}$ to decomposition groups at $p$.
If these restrictions are moreover semisimple, we show that the
$(\varphi,\Gamma)$-modules attached to this diagram by Breuil give, under
Fontaine's equivalence, the tensor inductions of the duals of the restrictions
of $\bar{r}$ to decomposition groups at $p$.
