| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2023-07-26 19:50:04 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2023-07-26 19:50:04 UTC |
| parent | e30e052f2b2496434db47fa2bcc8a5d7f1b486af |
| xmpp/ChatMessage.hx | +4 | -0 |
diff --git a/xmpp/ChatMessage.hx b/xmpp/ChatMessage.hx index e23ea24..9efbe97 100644 --- a/xmpp/ChatMessage.hx +++ b/xmpp/ChatMessage.hx @@ -73,6 +73,10 @@ class ChatMessage { return this.timestamp = timestamp; } + public function conversation():String { + return direction == MessageReceived ? JID.parse(from).asBare().asString() : JID.parse(to).asBare().asString(); + } + public function isIncoming():Bool { return direction == MessageReceived; }