Skip to content

Instantly share code, notes, and snippets.

@benlangfeld
Created September 22, 2010 16:44
Show Gist options
  • Save benlangfeld/592051 to your computer and use it in GitHub Desktop.
Save benlangfeld/592051 to your computer and use it in GitHub Desktop.
- (void)notifyRosterOfConversationMetadataUpdate:(CPNotification)aNotification
{
var conversationID = [[aNotification object] conversationID];
stanza = [[TNXMLNode alloc] initWithName:@"conversation-update-notification" andAttributes:{"xmlns":"http://studiotalker.com/protocol/conversations", @"conversation-id":conversationID}];
CPLog.debug("Notifying roster of update to metadata for conversation with ID " + conversationID);
[[XMPPController defaultController] publishPEPPayload:stanza toNode:"http://studiotalker.com/protocol/conversations"];
}
- (void)notifyRosterOfConversationCommand:(TNXMLNode)aCommand onConversationWithID:(CPString)aConversationID
{
var stanza = [[TNXMLNode alloc] initWithName:@"conversation-command-notification"
andAttributes:{"xmlns":"http://studiotalker.com/protocol/conversations", @"conversation-id":aConversationID}];
[stanza addNode:[[aCommand copy] tree]];
CPLog.debug("Notifying roster of action for conversation with ID " + aConversationID);
[[XMPPController defaultController] publishPEPPayload:stanza toNode:"http://studiotalker.com/protocol/conversations"];
}
var SharedXMPPController = nil,
clientNode = "http://studiotalker.com/gui",
identity = {category:@"client", name:@"studiotalker", type:@"web"},
features = ["http://jabber.org/protocol/caps",
"http://jabber.org/protocol/disco#info",
"http://jabber.org/protocol/disco#items",
"http://studiotalker.com/protocol/conversations",
"http://studiotalker.com/protocol/conversations+notify"],
clientVer = b64_sha1(features.join());
- (void)sendControlAction:(CPString)anAction withMetaData:(JSObject)someMetaData
{
var command = [[TNXMLNode alloc] initWithName:@"command" andAttributes:{"xmlns":"http://jabber.org/protocol/commands", "node":anAction}],
metaData = [CPDictionary dictionaryWithJSObject:someMetaData],
keys = [metaData allKeys];
}
File1:6: incorrect indentation.
+ CPLog.debug("Notifying roster of update to metadata for conversation with ID " + conversationID);
File1:6: unbalanced [ and {.
+ CPLog.debug("Notifying roster of update to metadata for conversation with ID " + conversationID);
File1:15: incorrect indentation.
+ [stanza addNode:[[aCommand copy] tree]];
File1:15: unbalanced [ and {.
+ [stanza addNode:[[aCommand copy] tree]];
File1:22: missing statement separator.
+ clientNode = "http://studiotalker.com/gui",
File1:29: unbalanced [.
+ clientVer = b64_sha1(features.join());
File1:36: unbalanced [ and {.
+ keys = [metaData allKeys];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment