Create a new message.
433359
def message_create(self, originator, recipients, body, params=None):
        """"""
        if params is None: params = {}
        if type(recipients) == list:
            recipients = ','.join(recipients)

        params.update({'originator': originator, 'body': body, 'recipients': recipients})
        return Message().load(self.request('messages', 'POST', params))
616004
protected function createMessage()
	{
		$message = new Message( new Swift_Message );

		// If a global from address has been specified we will set it on every message
		// instances so the developer does not have to repeat themselves every time
		// they create a new message. We will just go ahead and push the address.
		if ( !empty( $this->from['address'] ) )
		{
			$message->from( $this->from['address'], $this->from['name'] );
		}

		return $message;
	}
168675
@Override
    public Message newMessage(final String message, final Object... params) {
        return getParameterized().set(message, params);
    }
65978
def build_message(self, checker):
        """"""
        solution = ' (%s)' % checker.solution if self.with_solutions else ''
        return '{} {}{}'.format(checker.code,
                                checker.msg,
                                solution)
385170
public MessageRecordDesc createNewMessage(BaseMessage message, String strKey)
    {
        MessageRecordDesc messageData = null;
        String strClassName = this.getField(MessageInfo.MESSAGE_CLASS).toString();
        messageData = (MessageRecordDesc)ClassServiceUtility.getClassService().makeObjectFromClassName(strClassName);
        if (messageData != null)
               messageData.init(message, strKey);
        return messageData;
    }
794022
def writemessage(self, text):
        """"""
        log.debug('writing message %r', text)
        self.write(chr(10)+text+chr(10))
        self.write(self._current_prompt+''.join(self._current_line))
1018466
protected function createMessage()
    {
        $message = new Message(new Swift_Message);

        // If a global from address has been specified we will set it on every message
        // instances so the developer does not have to repeat themselves every time
        // they create a new message. We will just go ahead and push the address.
        if (isset($this->from['address'])) {
            $message->from($this->from['address'], $this->from['name']);
        }

        return $message;
    }
1031151
def create
			@message = Message.new(message_params)

			if @message.valid?
				MessageMailer.message_me(@message).deliver_now
				redirect_to new_message_path, notice: "Thank you for your message."
			else
				render :new
			end
		end
1019481
def new_message(cls, from_user, to_users, subject, content):
        
        thread = Thread.objects.create(subject=subject)
        for user in to_users:
            thread.userthread_set.create(user=user, deleted=False, unread=True)
        thread.userthread_set.create(user=from_user, deleted=True, unread=False)
        msg = cls.objects.create(thread=thread, sender=from_user, content=content)
        message_sent.send(sender=cls, message=msg, thread=thread, reply=False)
        return msg
1185793
@Override
    public Message newMessage(final String message, final Object... params) {
        return new StringFormattedMessage(message, params);
    }
607376
protected UserMessage createTellMessage (BodyObject source, String message)
    {
        return UserMessage.create(source.getVisibleName(), message);
    }
1023647
def send(self, message, *args, **kwargs):
        '''
        
        '''
        self._messages.put((message, args, kwargs), False)
150815
function Message (opts) {
  if (!(this instanceof Message)) return new Message(opts)

  this.type = opts.type || 0
  this.clientReference = opts.clientReference || null
  this.direction = opts.direction || 'out'
  this.flashMessage = opts.flash || null
  this.messageId = opts.messageId || null
  this.networkId = opts.networkId || null
  this.rate = opts.rate || null
  this.registeredDelivery = opts.registeredDelivery || null
  this.status = opts.status || null
  this.time = opts.time || null
  this.udh = opts.udh || null
  this.units = opts.units || null
  this.updateTime = opts.updateTime || null

  if (isAnImportantParamMissing(opts)) {
    throw new SMSGHError('Important message option missing. Required options are: `from`, `to` and  `content`')
  }

  var i = 0
  var l = Message._importantParams.length
  for (i = 0; i < l; i++) {
    this[Message._importantParams[i]] = opts[Message._importantParams[i]]
  }
}
193622
def create_message(self, channel_id, text):
        

        baseurl = self.rest_baseurl + \
            '/channels/{}/messages'.format(channel_id)
        requests.post(baseurl,
                      headers=self.headers,
                      data=json.dumps({'content': text}))
436028
def make_message(self, data):

        

        data = self.codec.loads(data)
        msg = Message(
            data.get("data"),
            *data.get("args",[]),
            **data.get("kwargs",{})
        )
        msg.meta.update(data.get("meta"))
        self.trigger("make_message", data, msg)
        return msg
841738
@Override
    public Message newMessage(final String message) {
        final ReusableSimpleMessage result = getSimple();
        result.set(message);
        return result;
    }
25636
async def _on_message(self, update):
        """"""

        name = update['service']
        message_obj = update['payload']

        if name not in self.services:
            return

        with self._state_lock:
            self.services[name].post_message(message_obj['level'], message_obj['message'])