31 lines
664 B
Java
31 lines
664 B
Java
package org.mercury_im.messenger.entity.contact;
|
|
|
|
import org.mercury_im.messenger.entity.Account;
|
|
|
|
import java.util.UUID;
|
|
|
|
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.
|
|
*/
|
|
@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;
|
|
}
|
|
}
|