private void NewChannel(object sender, RoutedEventArgs e) { var newch = new NewChannel(new NewChannelViewModel(_client)); if (newch.ShowDialog().Value == true) { var channel = newch.ChannelName; _client.SubscribeToChannel(channel); Logging.Event("Created new channel"); } else { Logging.Event("Cancelled new channel creation"); } }
public IChannel CreateChannel([FromBody] NewChannel channel) { channel.OwnerId = _am.Authenticate(HttpContext).Id; return(_cm.CreateChannel(channel)); }