What does 'last activity' option consist of? Calls, chatting, sending files? But what about undelivered messages? Help me, please!

More detail: I talked to one of my contacts last time on May 12, 2013. So our last activity should be 1 month ago. But it shows 1 day ago. Probably it means my contact sent me a message 1 day ago but it is undelivered now for me because we are not online both? true? (p.s. this contact was online (last seen) June 14)