From 9f2a245ce8d13802ba447c7b55a02721308bb2b7 Mon Sep 17 00:00:00 2001 From: kske Date: Thu, 2 Jan 2020 17:46:20 +0200 Subject: [PATCH] Adder userId to Contacts --- src/main/java/envoy/data/Contacts.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/data/Contacts.java b/src/main/java/envoy/data/Contacts.java index 8374168..5c5314c 100644 --- a/src/main/java/envoy/data/Contacts.java +++ b/src/main/java/envoy/data/Contacts.java @@ -13,10 +13,26 @@ import java.util.List; */ public class Contacts implements Serializable { - private List contacts; + private long userId; + private List contacts; private static final long serialVersionUID = 136970804968152871L; + @Override + public String toString() { return String.format("Contacts[%s]", contacts); } + + /** + * @return the ID of the user this contacts belong to + * @since Envoy Common v0.2-alpha + */ + public long getUserId() { return userId; } + + /** + * @param userId the ID of the user this contacts belong to + * @since Envoy Common v0.2-alpha + */ + public void setUserId(long userId) { this.userId = userId; } + /** * @return a list of users messages can be sent to * @since Envoy Common v0.2-alpha