summaryrefslogtreecommitdiff
path: root/Assistant
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-12 13:27:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-12 13:27:30 -0400
commit044aee255fe74ae5eb70e64a8ee412402e2364be (patch)
tree18fadfb72b8561b10c38a6a0c463123007c04ae0 /Assistant
parent4465da86bc53226f3b5185b33731fc6daa6f0015 (diff)
upper-case first char of buddy name
Diffstat (limited to 'Assistant')
-rw-r--r--Assistant/XMPP/Buddies.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Assistant/XMPP/Buddies.hs b/Assistant/XMPP/Buddies.hs
index 7383c38d9..0c466e51c 100644
--- a/Assistant/XMPP/Buddies.hs
+++ b/Assistant/XMPP/Buddies.hs
@@ -23,6 +23,10 @@ genBuddyKey j = BuddyKey $ formatJID $ baseJID j
buddyName :: JID -> Text
buddyName j = maybe (T.pack "") strNode (jidNode j)
+ucFirst :: Text -> Text
+ucFirst s = let (first, rest) = T.splitAt 1 s
+ in T.concat [T.toUpper first, rest]
+
{- Summary of info about a buddy.
-
- If the buddy has no clients at all anymore, returns Nothing. -}