Try to turn invitation query params into integers first

This will prevent those annoying "invalid literal for int() with base
10:" query errors.