Extended γ-ray emission in solar flares