/*
Adds a channel with identification.
@requesterID and @conversationID are optional.
193641
public void addChannel(
            T channel,
            String functionalityName,
            String requesterID,
            String conversationID)
    {
        T oldCh = null;
        synchronized (this.channelsWithId)
        {
            oldCh = this.channelsWithId.get(calculateId(functionalityName, requesterID, conversationID));
            this.channelsWithId.put(calculateId(functionalityName, requesterID, conversationID), channel);
        }
        synchronized (this.channelsWithFunctionalityName)
        {
            Collection<T> channelsForFunctionalityName = this.channelsWithFunctionalityName.get(functionalityName);
            if (null == channelsForFunctionalityName)
            {
                channelsForFunctionalityName = new ArrayList<T>();
            }
            // channels are stored in
            if (null != oldCh)
            {
                channelsForFunctionalityName.remove(oldCh);
            }
            channelsForFunctionalityName = this.removeInternalChannels(channelsForFunctionalityName);
            channelsForFunctionalityName.add(channel);
            this.channelsWithFunctionalityName.put(functionalityName, channelsForFunctionalityName);
        }
    }
81358
function idGen(channel, info) {
        var cid = channel.registry.generateClientId();
        var cookies;
        var ids;


        // Return the id only if token was validated.
        // More checks could be done here to ensure that token is unique in ids.
        ids = channel.registry.getIds();
        cookies = info.cookies;
        if (cookies.player) {

            if (!ids[cookies.player] || ids[cookies.player].disconnected) {
                return cookies.player;
            }
            else {
                console.log("already in ids", cookies.player);
                return false;
            }
        }
    }
397623
public function bridge_addchannel($bridgeId = NULL, $channel = NULL, $role = NULL)
	{
		return $this->addChannel($bridgeId, $channel, $role);
	}
852368
public void addParticipants(@NonNull final String conversationId, @NonNull final List<Participant> participants, @Nullable Callback<ComapiResult<Void>> callback) {
        adapter.adapt(addParticipants(conversationId, participants), callback);
    }
104740
def member_add(self, stream_id, user_id):
        '''  '''
        req_hook = 'pod/v1/room/' + str(stream_id) + '/membership/add'
        req_args = '{ "id": %s }' % user_id
        status_code, response = self.__rest__.POST_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
228281
def add_subscriber_to_channel(channel, message)
      registry_channels = CelluloidPubsub::Registry.channels
      @channels << channel
      registry_channels << channel unless registry_channels.include?(channel)
      @server.mutex.synchronize do
        @server.subscribers[channel] = channel_subscribers(channel).push(reactor: Actor.current, message: message)
      end
    end
1026682
def channels_invite(self, room_id, user_id, **kwargs):
        """"""
        return self.__call_api_post('channels.invite', roomId=room_id, userId=user_id, kwargs=kwargs)
9491
public void addIdentity(Identity identity) {
        identities.add(identity);
        identitiesSet.add(identity.getKey());
    }
838862
@Override
    public synchronized ChannelData addChannel(String channelName, Class<?> factoryType, Map<Object, Object> inputPropertyBag, int weight) throws ChannelException {
        return addChannelInternal(channelName, factoryType, inputPropertyBag, weight);
    }
1209871
@TargetApi(Build.VERSION_CODES.O)
  public static void setDefaultChannelId(Context context, String channelId) {
    DefaultChannelId = channelId;
    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1) {
      // do nothing for Android versions before Ore
      return;
    }

    try {
      NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
      CharSequence name = context.getPackageName();
      String description = "PushNotification";
      int importance = NotificationManager.IMPORTANCE_DEFAULT;
      android.app.NotificationChannel channel = new android.app.NotificationChannel(channelId, name, importance);
      channel.setDescription(description);
      notificationManager.createNotificationChannel(channel);
    } catch (Exception ex) {
      LOGGER.w("failed to create NotificationChannel, then perhaps PushNotification doesn't work well on Android O and newer version.");
    }
  }
638160
public function addChannel(ChannelInterface $channel)
    {
        $this->getChannelStore()
            ->addChannel($channel);

        $processor = $channel->getProcessor();
        if ($processor) {
            $this->getProcessorStore()->addProcessor($processor);
        }
    }
502586
public void addMembers(final List<String> memberIds, final AVIMConversationCallback callback) {
    if (null == memberIds || memberIds.size() < 1) {
      if (null != callback) {
        callback.done(new AVIMException(new IllegalArgumentException("memberIds is null")));
      }
      return;
    }
    Map<String, Object> params = new HashMap<String, Object>();
    params.put(Conversation.PARAM_CONVERSATION_MEMBER, memberIds);
    boolean ret = InternalConfiguration.getOperationTube().processMembers(this.client.getClientId(), this.conversationId,
            getType(), JSON.toJSONString(params), Conversation.AVIMOperation.CONVERSATION_ADD_MEMBER, callback);
    if (!ret && null != callback) {
      callback.internalDone(null,
              new AVException(AVException.OPERATION_FORBIDDEN, "couldn't start service in background."));
    }
  }
560797
public void addChannelToCache(Channel channel) {
        Channel oldChannel = channels.put(channel.getId(), channel);
        if (oldChannel != channel && oldChannel instanceof Cleanupable) {
            ((Cleanupable) oldChannel).cleanup();
        }
    }
24164
def channels_add_all(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('channels.addAll', roomId=room_id, kwargs=kwargs)
219949
public function addDnc($id, $channel = 'email', $reason = Contacts::MANUAL, $channelId = null, $comments = 'via API') {

        return $this->makeRequest(
            'contacts/'.$id.'/dnc/'.$channel.'/add',
            array(
                'reason'    => $reason,
                'channelId' => $channelId,
                'comments'  => $comments,
            ),
            'POST'
        );
    }
507954
private synchronized void createChannel(String channel) {
        if (!channelExists(channel)) {
            Queue queue = new Queue(channel, true, false, true);
            admin.declareQueue(queue);
            Binding binding = new Binding(channel, DestinationType.QUEUE, exchange.getName(), channel + ".#", null);
            admin.declareBinding(binding);
        }
    }
1079665
public void addIdentifiers(String[] id) {
		XmpArray array = new XmpArray(XmpArray.UNORDERED);
		for (int i = 0; i < id.length; i++) {
			array.add(id[i]);
		}
		setProperty(IDENTIFIER, array);
	}