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

Now handling account names with dashes in them properly. Closes #113.

parent e27da2b2
......@@ -90,13 +90,12 @@ class MessageSplitViewController: NSSplitViewController
// This is the URL that will be prefixed to all assets in the HTML (images, etc.)
let assetURLPrefix = CurrentTimeline.relativeWebPrefix!.stringByAppendingPathComponent(messageFileName)
println("Asset URL Prefix: \(assetURLPrefix)")
println("Message file name: \(messageFileName)")
// println("Asset URL Prefix: \(assetURLPrefix)")
// println("Message file name: \(messageFileName)")
let filePath = NSHomeDirectory().stringByAppendingPathComponent("Pulse/Sync").stringByAppendingPathComponent(CurrentTimeline.path!).stringByAppendingPathComponent(messageFileName)
println("About to save message at path: \(filePath)")
// println("About to save message at path: \(filePath)")
let fileURL:NSURL? = NSURL(fileURLWithPath: filePath, isDirectory: true)
......
......@@ -103,7 +103,7 @@ public class NativeNotification: NSObject, NSUserNotificationCenterDelegate
}
//
// Handle All Friends and (TODO) Conversation timeline notifications.
// Handle All Friends and Conversation timeline notifications.
//
func handleTimelineNotification(notification:NSNotification)
{
......@@ -112,7 +112,7 @@ public class NativeNotification: NSObject, NSUserNotificationCenterDelegate
if let userInfo = notification.userInfo, notificationType:String = userInfo["type"] as? String, data:AnyObject = userInfo["data"], repo = data["repo"] as? String, name = data["name"] as? String
{
var fromPerson = repo.componentsSeparatedByString("-")[0]
var fromPerson = repo.componentsSeparatedByString("-to")[0]
//
// Initial values of notificationType-specific values.
......
......@@ -76,7 +76,7 @@ public class TeleportationAPI:NSObject
println("ℹ️ This Pulse message is *not* from Waystone. Ignoring. ")
return
}
// Find out what kind of message it is
let messageTypeStartIndex = messageFileName.rangesOfString("__")[0].endIndex
let messageType = messageFileName.substringFromIndex(messageTypeStartIndex)
......
......@@ -157,7 +157,7 @@ class TimelineViewController: NSViewController, WKNavigationDelegate
if let userInfo = notification.userInfo, data:AnyObject = userInfo["data"], repo = data["repo"] as? String
{
println("Repo: \(repo)")
let components = repo.componentsSeparatedByString("-")
let components = repo.componentsSeparatedByString("-to")
if components.count > 0
{
......
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