Merge similar messages together