9.51: added ->lookup_or_create_channel() method and eliminated repetition.