Salim narrates from his father (Sayyiduna Abdullah bin Umar, may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) forbade two kinds of eating: "Sitting and eating at a table on which wine is passed around, and he forbade eating while lying on one's stomach."
Our scholars said: If he accepted the invitation without knowing, he may sit, but he should not assist the people in the sin nor attend to their amusements, and then he should leave.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصداق / 14550