Mercury-IM/entity/src/main/java/org/mercury_im/messenger/entity/contact/Peer.java

31 lines
664 B
Java
Raw Normal View History

2019-11-18 23:51:27 +01:00
package org.mercury_im.messenger.entity.contact;
2019-11-18 23:51:27 +01:00
import org.mercury_im.messenger.entity.Account;
2019-12-21 16:30:14 +01:00
import java.util.UUID;
2020-05-16 15:53:54 +02:00
import lombok.Data;
import lombok.With;
/**
* Defines a user on the network (eg. a contact, chat partner, group chat member etc).
* Basically anyone that may send you a message is a Peer.
*/
2020-05-16 15:53:54 +02:00
@Data
public class Peer {
UUID id;
Account account;
String address;
String name;
SubscriptionDirection subscriptionDirection;
boolean subscriptionPending;
boolean subscriptionApproved;
public String getDisplayName() {
if (name != null) {
return name;
}
return address;
}
}