added missing parameters to listMessages