Oops, I accidentally ended up praying Asr twice
Salaam everyone. So, the other day I heard the Adhan and headed to the masjid for Asr. When I walked in, I saw a few people inside-some sitting, some praying. I figured they weren't going to pray in jama'ah, so I went ahead and prayed alone in the first row. After I finished, I stayed in my spot reading some adhkar. Then, the imam came in to lead the jama'ah prayer. Before I knew it, people gathered around quickly, and I didn't really have a choice but to join them and pray Asr all over again. Was that okay to do, or did I make a mistake?