diff options
author | Joe Crayne <joe@jerkface.net> | 2018-11-13 16:53:24 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-11-14 01:29:41 -0500 |
commit | 971b23b40e2b519107923dcb6976145e2b83b9cf (patch) | |
tree | 733086bcca436b4726e0507738638f4d06a77b86 /Presence/Util.hs | |
parent | c2cce27bc86c5aefccc5e2afa9b2063e8c915336 (diff) |
MUC: Two-step nominate/comit chat transactions.
Diffstat (limited to 'Presence/Util.hs')
-rw-r--r-- | Presence/Util.hs | 3 |
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) | |||
14 | type UserName = Text | 14 | type UserName = Text |
15 | type ResourceName = Text | 15 | type ResourceName = Text |
16 | 16 | ||
17 | stripResource :: Text -> Text | ||
18 | stripResource jid = let (n,h,_) = splitJID jid | ||
19 | in unsplitJID (n,h,Nothing) | ||
17 | 20 | ||
18 | unsplitJID :: (Maybe UserName,Text,Maybe ResourceName) -> Text | 21 | unsplitJID :: (Maybe UserName,Text,Maybe ResourceName) -> Text |
19 | unsplitJID (n,h,r) = username <> h <> resource | 22 | unsplitJID (n,h,r) = username <> h <> resource |