Attempts to add a message to the request using the 'messages' app.
344916
def add_message(request, level, message, extra_tags='', fail_silently=False):
    """"""
    if not horizon_message_already_queued(request, message):
        if request.is_ajax():
            tag = constants.DEFAULT_TAGS[level]
            # if message is marked as safe, pass "safe" tag as extra_tags so
            # that client can skip HTML escape for the message when rendering
            if isinstance(message, SafeData):
                extra_tags = extra_tags + ' safe'
            request.horizon['async_messages'].append([tag,
                                                      force_text(message),
                                                      extra_tags])
        else:
            return _messages.add_message(request, level, message,
                                         extra_tags, fail_silently)
1194395
public void addMessages(List<CmsMessages> messages) {

        if (messages == null) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_MULTIMSG_EMPTY_LIST_0));
        }

        Iterator<CmsMessages> i = messages.iterator();
        while (i.hasNext()) {
            addMessages(i.next());
        }
    }
186184
def send_response_message(self, request_id, meta, body):
        
        self.response_messages.append((request_id, meta, body))
510490
public void addMessage(final long messageId, final List<Token> messageTokens)
    {
        Verify.notNull(messageTokens, "messageTokens");

        captureTypes(messageTokens, 0, messageTokens.size() - 1);
        updateComponentTokenCounts(messageTokens);

        messagesByIdMap.put(messageId, new ArrayList<>(messageTokens));
    }
701005
def put(self, request, bot_id, id, format=None):
        
        return super(MessengerChatStateDetail, self).put(request, bot_id, id, format)
596636
def success(request, message, extra_tags='', fail_silently=False):
    """"""
    add_message(request, constants.SUCCESS, message, extra_tags=extra_tags,
                fail_silently=fail_silently)
512022
def add_message(message)
      @messages.key?(message.name) and raise SpecificationError,
        "A message named #{message.name} was already defined in #@protocol"
      @messages[message.name] = message
    end
1187605
def add(message, partition_id)
      @messages << message

      @topics[message.topic] ||= {}
      @topics[message.topic][partition_id] ||= []
      @topics[message.topic][partition_id] << message
    end
839654
public static void addError(final HttpServletRequest request, final String message) {
		StringBuilder sb = (StringBuilder) request.getAttribute(ERROR_KEY);
		if (sb == null) {
			sb = new StringBuilder();
			request.setAttribute(ERROR_KEY, sb);
		}
		sb.append(message);
	}
469892
def add_message(self, id, body, tags=False):
        
        if not tags:
            tags = {}
        try:
            self._tx_queue_lock.acquire()
            self._tx_queue.append(
                EventHub_pb2.Message(id=id, body=body, tags=tags, zone_id=self.eventhub_client.zone_id))
        finally:
            self._tx_queue_lock.release()
        return self
163387
def handle_message(self, msg):
        
        self._messages.append({
            'type': msg.category,
            'module': msg.module,
            'obj': msg.obj,
            'line': msg.line,
            'column': msg.column,
            'path': msg.path,
            'symbol': msg.symbol,
            'message': str(msg.msg) or '',
            'message-id': msg.msg_id,
        })
976623
private void addMessage(final WMessageBox box, final Message message, final boolean encode) {
		String code = message.getMessage();

		if (!Util.empty(code)) {
			box.addMessage(encode, code, message.getArgs());
		}
	}
697995
def add_info(self, header, message):
        ''''''
        current_message = self.args[0]
        message = current_message + self._format_info(header, message)
        self.args = (message,) + self.args[1:]
793827
def message(message)
      reqdata = reqdata()
      reqdata.merge!({
        :nick => @endpoint[:nick],
        :type => "chat",
        :style => "",
        :timestamp => Time.now.to_f * 1000
      })
      reqdata.merge!(message)
      httpost('/messages', reqdata)
    end
464287
def push(self, message, callback_arg=None):
        

        if message['action'] == 'upsert':
            message.setdefault('key_names', self.key_names)

        message['client_id'] = self.client_id
        message.setdefault('table_name', self.table_name)

        self._add_message(message, callback_arg)

        batch = self._take_batch(self.target_messages_per_batch)
        if batch:
            self._send_batch(batch)
347666
def _create_request(self, messages):
        

        msg = ','.join(messages)
        request = '{{"request":"sender data","data":[{msg}]}}'.format(msg=msg)
        request = request.encode("utf-8")
        logger.debug('Request: %s', request)

        return request
477312
def send_message(self, message):
        
        if self.connected:
            self.send(
                json.dumps(message.request))