From 06b8594f427674fd3e0229941c5019c2018acec8 Mon Sep 17 00:00:00 2001 From: DieGurke <55625494+DieGurke@users.noreply.github.com> Date: Sun, 9 Feb 2020 23:58:09 +0100 Subject: [PATCH] Adjusted ContactsRequest --- src/main/java/envoy/event/ContactsRequest.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/event/ContactsRequest.java b/src/main/java/envoy/event/ContactsRequest.java index 04abcfd..00d593d 100644 --- a/src/main/java/envoy/event/ContactsRequest.java +++ b/src/main/java/envoy/event/ContactsRequest.java @@ -1,5 +1,7 @@ package envoy.event; +import envoy.data.User; + /** * Project: envoy-common
* File: ContactsRequest.java
@@ -11,6 +13,7 @@ package envoy.event; public class ContactsRequest implements Event { private final String request; + private final User client; private static final long serialVersionUID = -7969312055630533627L; @@ -21,7 +24,10 @@ public class ContactsRequest implements Event { * corresponding clients as contacts from the server. * @since Envoy Common v0.2-alpha */ - public ContactsRequest(String request) { this.request = request; } + public ContactsRequest(String request, User client) { + this.request = request; + this.client = client; + } /** * @return the request string @@ -29,4 +35,9 @@ public class ContactsRequest implements Event { */ @Override public String get() { return request; } + + /** + * @return returns the client, which sent this request + */ + public User getClient() { return client; } }