Reduce duplicated code.
Merge branch 'feature-xep-muc'