This question already has an answer here:
Which one you would choose?
I really had had a pleasant meal until you came
I really had a pleasant meal until you came
I personally think that both are correct, but I am interested to see which one has greater emphasis.