diff options
Diffstat (limited to '')
-rw-r--r-- | src/de/gultsch/chat/xmpp/MessagePacket.java | 8 |
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(); + } } |