I hacked my Messages

I’m not a fan of Apple’s Messages desktop application, but there was no escape when I bought a new computer last December. Because this is not my only discomfort with Mountain Lion (slow RSS-less Safari, slow scrolling, ugly GUIs, weird file system, weird lots) I kept using my 3,5 year old MBP a lot. But mainly because I disliked so many things about this new chat program. In the way I work I’m depending on chat (and disliking Skype even more), and I need the search functions for text, links and images to refer to discussions at a later date.

Messages is great when you use iMessages with email addresses and want to have the conversations on all your devices. This does not work with phone numbers (how I text message mostly) and not with my ancient AIM name which I still happily use. But what I’m bemoaning most are the missing inline images as soon as you close the chat, the inaccessible way it stores chat transcripts and loss of the ability to determine where they get saved, plus the lousy search function. Basically I miss all the great functionality the Chax extension added to iChat.

So I did some investigations and hacks.

Despite the (buggy) infinite scroll in the chat window, there are still individual transcripts of all chats, stored in the same why as it was in iChat: named by recipient and date, sorted into folders per day. These live in your user library folder (User/Library/Messages/Archive) which is invisible by default, but you can make it visible by alt-clicking into the Go-to menu in the Finder. One tip I read is to then drag this folder into the side bar of a window if you want to access it frequently. There are also tool sets like Mountain Tweaks that let you make the the library folder permanently visible (and many more handy things).

Okay, I found my logs and can open them individually for easier search and reference, but all inline files are still missing. That makes it hard to reconstruct conversations and you have to remember to save important files to your desktop. There is an Attachments folder in the Library/Messages folder, but it seems to only stores images that are send in an iMessages conversation from a phone number.

A second important thing for me is to determine the place where to save the transcripts. I had set up iChat to store these in a folder in my Dropbox. This is a handy auto-backup and great if you use more than one computer and want to have them all saved into the same archive. I googled a fair bit and finally found this recipe how to change the location of your Messages archive folder. After a tiny struggle with Terminal it worked. Be sure to follow the instructions exactly. The command creates an alias where the default library-folder was that links to your new folder in your dropbox.*

Screenshot

Rejoice, I now have one unified place again for both iChat and Messages transcripts in my Dropbox. But the coolest discovery is this: since Messages still uses the same file format as iChat, it displays chats I did on iChat together with the chats from Messages in its chat window. In reverse I can open all chats from Messages in iChat on my old computer – WITH THE INLINE IMAGES ALL IN PLACE! What the hell Apple!? Why don’t you let us see the images when they are still all saved into the log files? These are just as big or small as before, depending on how many images you pasted (from 2K for a single line of text to several 100 MB.)

This all may not bother you if you only us one computer or don’t want to reference your chat logs, but for me it lets me make peace with this unbeloved machine and finally start enjoying it in all its high res glory.

 

* Potential problems: If you try to chat right after hacking your Messages and it doesn’t work with peeps you were talking to shortly before, Messages might have a hick-up and confuses the transcripts. Quit the app, move the latest convo with that contact out of the archive folder and try again. Secondly, after my first Terminal attempt, my video chat icon disappeared and Messages told me my computer is not able to video chat. If this happens to you, put “defaults write com.apple.iChat newbwdup 300000” into your Terminal and it will reset something magically.