aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/xmpp/MessagePacket.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 15:07:20 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 15:07:20 +0100
commit53d9c9997a508985f0e19aba928bfa25c80ba23e (patch)
tree5e79bfe04db8d51091bcf9b94baa979217e9d542 /src/de/gultsch/chat/xmpp/MessagePacket.java
parent43531113b798cda6b2f76257641f38b0af986437 (diff)
more cleanup. more listeners
Diffstat (limited to 'src/de/gultsch/chat/xmpp/MessagePacket.java')
-rw-r--r--src/de/gultsch/chat/xmpp/MessagePacket.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/de/gultsch/chat/xmpp/MessagePacket.java b/src/de/gultsch/chat/xmpp/MessagePacket.java
index de6e0234..313fb355 100644
--- a/src/de/gultsch/chat/xmpp/MessagePacket.java
+++ b/src/de/gultsch/chat/xmpp/MessagePacket.java
@@ -10,4 +10,12 @@ public class MessagePacket extends Element {
public MessagePacket() {
super("message");
}
+
+ public String getFrom() {
+ return getAttribute("from");
+ }
+
+ public String getBody() {
+ return this.findChild("body").getContent();
+ }
}