The attack on the Telegram app, which slowed connectivity but did not compromise user data, came as thousands surrounded Hong Kong government headquarters on Wednesday to protest legislation that would allow people to be extradited to mainland China to stand trial.