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

Rendering names properly on conversation timelines.

parent 430625cf
......@@ -8,12 +8,12 @@
#
# Copyright © 2014-2015, Aral Balkan, Ind.ie. All Rights Reserved.
#
# We are working on releasing the Heartbeat code under a license that is free
# as in freedom and yet allows us to publish and distribute Heartbeat on the
# We are working on releasing the Heartbeat code under a license that is free
# as in freedom and yet allows us to publish and distribute Heartbeat on the
# App Store. In the meanwhile, we are releasing it, all rights reserved,
# for review.
#
# To follow the updates on the licensing, please see the
# To follow the updates on the licensing, please see the
# Towards Ind.ie Commons Licenses thread on the Ind.ie forum
# (https://forum.ind.ie/t/towards-ind-ie-commons-licenses/690)
#
......@@ -147,7 +147,7 @@ class Commands
##########################################################################################
#
# Post a message (weave it into a timeline)
#
#
##########################################################################################
postMessage: (id, messageID, message, timeline) =>
......@@ -158,7 +158,7 @@ class Commands
##########################################################################################
#
# Get timeline (returns a timeline)
#
#
##########################################################################################
getTimeline: (id, timeline) =>
......@@ -182,7 +182,7 @@ class Commands
##########################################################################################
#
# Get friends (returns the list of friends)
#
#
##########################################################################################
getFriends: (id) =>
......@@ -415,7 +415,7 @@ class Commands
# Make all the folders
#
foldersToMake =
foldersToMake =
[
friendsFolder,
friendsToFolder,
......@@ -439,7 +439,7 @@ class Commands
# Add friend’s device to the Pulse config.
# TODO: When we support multiple devices, this should be an array of devices.
#
friendsDevice =
friendsDevice =
'DeviceID': friendsDeviceID,
'Name': friendsAccountHandle,
'Addresses': ['dynamic']
......@@ -448,14 +448,14 @@ class Commands
console.log 'New devices array:'
console.log config.Devices
folderIDs =
folderIDs =
[
"#{myAccountHandle}-to-#{friendsAccountHandle}",
"#{friendsAccountHandle}-to-#{myAccountHandle}",
"#{friendsAccountHandle}-to-all-friends"
]
folderPaths =
folderPaths =
[
friendsToFolder,
friendsFromFolder,
......@@ -463,7 +463,7 @@ class Commands
]
folderReadOnlySettings =
folderReadOnlySettings =
[
true,
false,
......@@ -478,8 +478,8 @@ class Commands
folderID = folderIDs[i]
folderPath = folderPaths[i]
folderReadOnly = folderReadOnlySettings[i]
folder =
folder =
ID: folderID
Path: folderPath
Devices: [{'deviceID': friendsDeviceID}]
......@@ -495,7 +495,7 @@ class Commands
config.Folders.push folder
console.log 'New Folders array :'
console.log config.Folders
console.log config.Folders
# About to update the all friends folder.
console.log 'About to update the all friends folder.'
......@@ -510,17 +510,17 @@ class Commands
folder.Devices.push {'deviceID': friendsDeviceID}
console.log 'Folders array after all friends devices update:'
console.log config.Folders
console.log config.Folders
@pulseAPI.postConfig(config)
.then (result) =>
console.log 'Posted updated configuration with new friend.'
# log result
#
# 6. Restart Pulse with the new configuration.
#
@pulseAPI.postRestart()
.then (result) =>
console.log 'Restarted Pulse.'
......@@ -559,7 +559,7 @@ class Commands
isValid = do ->
console.log code
# Invitation codes are in the form <word>-<word>-XY[Z]. So the
# Invitation codes are in the form <word>-<word>-XY[Z]. So the
# absolute minimum length can be 6.
if code.length < 6 or code.length > 255
console.log 'Wrong length'
......@@ -699,7 +699,7 @@ class Commands
# Takes a JSON response object and returns it via the web socket. Chainable.
#
returnJSONResponse: (id, responseJSON) =>
messageObject =
messageObject =
id: id,
response: responseJSON
......@@ -708,8 +708,8 @@ class Commands
log.info "Returning JSON string: #{messageObjectAsJSONString}"
@ws.send(messageObjectAsJSONString, {binary: true})
return responseJSON
return responseJSON
module.exports = Commands
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