summaryrefslogtreecommitdiff
path: root/Presence/Util.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-11-13 16:53:24 -0500
committerJoe Crayne <joe@jerkface.net>2018-11-14 01:29:41 -0500
commit971b23b40e2b519107923dcb6976145e2b83b9cf (patch)
tree733086bcca436b4726e0507738638f4d06a77b86 /Presence/Util.hs
parentc2cce27bc86c5aefccc5e2afa9b2063e8c915336 (diff)
MUC: Two-step nominate/comit chat transactions.
Diffstat (limited to 'Presence/Util.hs')
-rw-r--r--Presence/Util.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Presence/Util.hs b/Presence/Util.hs
index ef98d415..e19b35fd 100644
--- a/Presence/Util.hs
+++ b/Presence/Util.hs
@@ -14,6 +14,9 @@ import Network.Address (setPort)
14type UserName = Text 14type UserName = Text
15type ResourceName = Text 15type ResourceName = Text
16 16
17stripResource :: Text -> Text
18stripResource jid = let (n,h,_) = splitJID jid
19 in unsplitJID (n,h,Nothing)
17 20
18unsplitJID :: (Maybe UserName,Text,Maybe ResourceName) -> Text 21unsplitJID :: (Maybe UserName,Text,Maybe ResourceName) -> Text
19unsplitJID (n,h,r) = username <> h <> resource 22unsplitJID (n,h,r) = username <> h <> resource