The person was probably feeding their blissey golden razzberries remotely. You aren't allowed to place a new pokemon in a gym when its being attacked. You can however, feed pokemon in a friendly gym at any time even when it is getting attacked, similarly to how you could prestige a gym when it...