The Messenger of Allah ﷺ used to give the salam to his right and to his left.
حدثنا محمود بن غيلان حدثنا بشر بن السري عن مصعب بن ثابت بن عبد الله بن الزبير عن إسمعيل بن محمد بن سعد بن أبي وقاص
أن رسول الله ﷺ كان يسلم عن يمينه وعن يساره
Muslim narrated it in the Book of Mosques, Chapter on the Salutation for Concluding the Prayer upon Finishing It and How It Is Done, hadith no. 582, from the hadith of Ismail, with this chain.