added 'messagesByType' to rpc api