Ind.ie is now Small Technology Foundation.
Commit 26697efa authored by Aral Balkan's avatar Aral Balkan

Accented characters are now handled correctly when writing out initial new...

Accented characters are now handled correctly when writing out initial new person announcement message.
parent 5007f608
......@@ -365,8 +365,9 @@ class MainInterfaceSplitViewController: NSSplitViewController
// Create the message, persist it, and notify the timeline to show it.
let messageString = "<p>Hey everyone, \(SetupData.displayName!) just joined Ind.ie! <a href='indie://friend/\(SetupData.accountHandle!)'>Send friendship request.</a></p>"
let messageData = messageString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
let messageAttributedString = NSAttributedString(HTML: messageData!, baseURL: NSURL(string: "")!, documentAttributes: nil)!
let messageAttributedString = NSAttributedString(HTML: messageData!, options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: NSUTF8StringEncoding], documentAttributes: nil)!
post(MessageNotification.named(.SendMessage), from: nil, with: ["message": messageAttributedString, "type":MessageType.named(.NewPersonNotification), "dontShowLocally":true])
}
}
......
false
\ No newline at end of file
true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment