only attempt to move pending msgs to msgs if there are some, fix issue with acl - message object undefined
only attempt to move pending msgs to msgs if there are some, fix issue with acl - message object undefined

cat-chat/cat-chat-cloud-code