package org.mercury_im.domain.data.util;

import org.mercury_im.messenger.entity.contact.Peer;

public class ContactNameUtil {

    public static String displayableNameFrom(Peer contact) {
        if (contact == null) {
            return null;
        }

        if (contact.getName() != null) {
            return contact.getName();
        }

       return contact.getAddress();
    }
}
