This question is currently in the Confluence collection, but I see you are asking about Hipchat. Can you please confirm if it's related to Confluence in any way or if you only encounter the issue in Hipchat?
Can you let us know what version of Hipchat you're using?
At this moment, it isn't possible to preview files that contain .diff extension. It is necessary to download it directly. I went ahead and raised a feature request on our portal for it:
Feel free to vote and comment to show your support!
Thank you for the feedback!
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event