def send_bulk_message(registration_ids, data, cloud_type, **kwargs):
 if (cloud_type == 'GCM'):
  max_recipients = SETTINGS.get('GCM_MAX_RECIPIENTS')
 elif (cloud_type == 'FCM'):
  max_recipients = SETTINGS.get('FCM_MAX_RECIPIENTS')
 else:
  raise ImproperlyConfigured(('cloud_type must be GCM or FCM not %s' % str(cloud_type)))
 if ((registration_ids is None) and ('/topics/' not in kwargs.get('to', ''))):
  return
 if registration_ids:
  if (len(registration_ids) > max_recipients):
   ret = []
   for chunk in _chunks(registration_ids, max_recipients):
    ret.append(_cm_send_json(chunk, data, cloud_type=cloud_type, **kwargs))
   return ret
 return _cm_send_json(registration_ids, data, cloud_type=cloud_type, **kwargs)

def send_bulk_message ( registration_ids , data , cloud_type , ** kwargs ) : if ( cloud_type == 'GCM' ) : max_recipients = SETTINGS . get ( 'GCM_MAX_RECIPIENTS' ) elif ( cloud_type == 'FCM' ) : max_recipients = SETTINGS . get ( 'FCM_MAX_RECIPIENTS' ) else : raise ImproperlyConfigured ( ( 'cloud_type must be GCM or FCM not %s' % str ( cloud_type ) ) ) if ( ( registration_ids is None ) and ( '/topics/' not in kwargs . get ( 'to' , '' ) ) ) : return if registration_ids : if ( len ( registration_ids ) > max_recipients ) : ret = [ ] for chunk in _chunks ( registration_ids , max_recipients ) : ret . append ( _cm_send_json ( chunk , data , cloud_type = cloud_type , ** kwargs ) ) return ret return _cm_send_json ( registration_ids , data , cloud_type = cloud_type , ** kwargs )
sends a gcm or fcm notification to one or more registration_ids .