def get_chat_name_from_id(all_id):
    """Get a chat name 'id1-id2-id3-...' from a list of id."""
    all_id.sort()
    chat_name = '{}'.format(all_id[0])
    for i in range(1, len(all_id)):
        chat_name += '-'
        chat_name += all_id[i]
    return chat_name