Fix issues 5490 and 5479 - consistently process invite activity wherever it is generated