Kanye West and John Legend appear to have put their differences aside after the rapper shared text messages from the singer online.

The duo celebrated together at the baby shower for Legend’s wife Chrissy Teigen, just days after West accused Legend of trying to “manipulate my free thought” when Legend asked him to reconsider aligning himself with Donald Trump.

West shared screenshots of text message from Legend on Twitter after the rapper sparked controversy for referring to the president as “my brother”.

Legend appeared to write in the text: “Hey it’s JL. I hope you’ll reconsider aligning yourself with Trump.

“You’re way too powerful and influential to endorse who he is and what he stands for. As you know, what you say really means something to your fans. They are loyal to you and respect your opinion.

“So many people who love you feel so betrayed right now because they know the harm that Trump’s policies cause, especially to people of colour.

“Don’t let this be part of your legacy. You’re the greatest artist of our generation.”

But the pair both smiled widely in a selfie shared by West at Teigen’s baby shower.

He captioned the photo:  “We got love. Agree to disagree.”

Legend also put on an impromptu performance for West and some of the baby shower guests, including West’s wife Kim Kardashian West.

West posted a video of Legend playing his hit Ordinary People, captioning it “Lead with love”.

Teigen also shared a picture from the surprise baby shower, of her with Kardashian West and another friend.

Both Legend and West can been seen in the background.

She captioned it: “a lot goin on at surprise baby shower.”

Legend and Teigen are expecting their second child together. They are already parents to daughter Luna, who was born in 2016.