Closed justinmchase closed 9 years ago
Previously this required client.connection.sendMessage
usage to send the protobuf messages. Now there is an API for this:
var parent = client.getChannelByName( 'My Channel' );
parent.addSubChannel( 'New channel' );
client.on( 'channel-create', function( channel ) {
// ...
});
(And yes. You still need the channel.name === name, etc.)
Perfect thanks! Can I get the root via getChannelByName( null )
? Or is it just hanging off of client?
I'd say use client.rootChannel
or maybe getChannelByName( 'Root' )
. I'm just assuming root channel is reported with the name of "Root" by the server.
I think it's null, I'll figure it out. Thanks.
I'm looking for something like: