add wait for table to ready
Merge branch 'user_presence' of https://github.com/edwardt/ejabberd-modules into user_presence