public override void sendMessageToChannel(User user, Channel channel, Message message) { if (!isChannelExists(channel)) { this.addChannel(channel); } /* if (!isUserExists(user)) * { * this.addUser(user); * }*/ FBManaging.addData(_firebase, globalChannelsPath + "/" + channel.NAME, message).Wait(); }
private bool isUserExists(User user) { return(FBManaging.isDataInPathExist(_firebase, FBConfigurations.ROOT_USERS + "/" + user.NAME).GetAwaiter().GetResult()); }
private bool isChannelExists(Channel channel) { return(FBManaging.isDataInPathExist(_firebase, globalChannelsPath + "/" + channel.NAME).GetAwaiter().GetResult()); }
public override void removeChannel(Channel newChannel) { FBManaging.removeData(_firebase, userChannelsPath, newChannel.NAME).Wait(); FBManaging.removeStructuredData(_firebase, globalChannelsPath, newChannel).Wait(); }