Chat invites

This replaces #258 for ease of merging.