Load Facebook messages.
541103
protected function loadMessages()
    {
        $messages = Collection::make($this->event->get('messaging'));
        $messages = $messages->transform(function ($msg) {
            $message = new IncomingMessage('', $this->getMessageSender($msg), $this->getMessageRecipient($msg), $msg);
            if (isset($msg['message']['text']) && ! isset($msg['message']['quick_reply']['payload'])) {
                $message->setText($msg['message']['text']);

                if (isset($msg['message']['nlp'])) {
                    $message->addExtras('nlp', $msg['message']['nlp']);
                }
            } elseif (isset($msg['postback']['payload'])) {
                $this->isPostback = true;

                $message->setText($msg['postback']['payload']);
            } elseif (isset($msg['message']['quick_reply']['payload'])) {
                $this->isPostback = true;

                $message->setText($msg['message']['quick_reply']['payload']);
            }

            return $message;
        })->toArray();

        if (count($messages) === 0) {
            $messages = [new IncomingMessage('', '', '')];
        }

        $this->messages = $messages;
    }
505957
def get_messages(chat_id):
    """"""

    mark_seen = request.args.get('mark_seen', True)

    chat = g.driver.get_chat_from_id(chat_id)
    msgs = list(g.driver.get_all_messages_in_chat(chat))

    for msg in msgs:
        print(msg.id)

    if mark_seen:
        for msg in msgs:
            try:
                msg.chat.send_seen()
            except:
                pass
    
    return jsonify(msgs)
486236
public function boot()
    {
        $this->app->when(FacebookChannel::class)
            ->needs(Facebook::class)
            ->give(function () {
                $pageToken = config('services.facebook.page-token');

                return new Facebook($pageToken);
            });
    }
1059252
private void loadMessagesFiles() {

        // Parse the first annotation found (manage overriding)
        final Localized local = ClassUtility.getLastClassAnnotation(this.getClass(), Localized.class);

        // Conf variable cannot be null because it was defined in this class
        // It's possible to discard default behavior by setting an empty string to the value.

        // launch the configuration search engine
        ResourceBuilders.MESSAGE_BUILDER.searchMessagesFiles(local.value());
    }
756393
public function loadMessages()
    {
        $message = new IncomingMessage(Video::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
            $this->event);
        $message->setVideos($this->getVideos());

        $this->messages = [$message];
    }
550793
def consume_message(self, header, message):
        """"""
        logmessage = {
            "time": (time.time() % 1000) * 1000,
            "header": "",
            "message": message,
        }
        if header:
            logmessage["header"] = (
                json.dumps(header, indent=2) + "\n" + "----------------" + "\n"
            )
        if isinstance(message, dict):
            logmessage["message"] = (
                json.dumps(message, indent=2) + "\n" + "----------------" + "\n"
            )

        print("=== Consume ====\n{header}{message}".format(**logmessage))
        self.log.info("Received message @{time}".format(**logmessage))
        self.log.debug(
            "Received message @{time}\n{header}{message}".format(**logmessage)
        )
        time.sleep(0.1)
1048097
def load(self):
        """"""
        try:
            self._read()
            self._parse()
        except Exception as exc:
            self.failed = True

            params = {'path': self._path, 'exception': exc}
            if self.fail_silently:
                LOG.warning("Error processing message json file '%(path)s': "
                            "%(exception)s", params)
            else:
                raise exceptions.MessageFailure(
                    _("Error processing message json file '%(path)s': "
                      "%(exception)s") % params)
681940
async def load_message(obj, msg_type, msg=None, field_archiver=None):
    
    msg = msg_type() if msg is None else msg

    fields = msg_type.f_specs() if msg_type else msg.__class__.f_specs()
    for field in fields:
        await load_message_field(obj, msg, field, field_archiver=field_archiver)

    return msg
583363
def _make_fake_message(self, user_id, page_id, payload):
        

        event = {
            'sender': {
                'id': user_id,
            },
            'recipient': {
                'id': page_id,
            },
            'postback': {
                'payload': ujson.dumps(payload),
            },
        }

        return FacebookMessage(event, self, False)
1239189
def loadalldatas():
    """"""
    dependency_order = ['common', 'profiles', 'blog', 'democomments']
    for app in dependency_order:
        project.recursive_load(os.path.join(paths.project_paths.manage_root, app))
24162
def load(fp, model=None, parser=None):
    """"""
    if not model:
        model = 'simple'
    if not parser:
        parser = 'quick'

    if model not in ['simple']:
        raise ValueError
    if parser not in ['quick']:
        raise ValueError

    if model == 'simple' and parser == 'quick':
        return ARPAParserQuick(ARPAModelSimple).parse(fp)
    else:
        raise ValueError
788665
public final boolean loadOwnedLinks() throws SevereMessageStoreException
    {
        boolean loaded = false;
        if (null == _references)
        {
            _references();
            loaded = true;
        }
        return loaded;
    }
1163401
def load(cls, bmessage):
        
        message_dict = msgpack.loads(bmessage, encoding="utf8", use_list=False)

        try:
            obj = MessageMeta._registered_messages[message_dict["type"]].__new__(MessageMeta._registered_messages[message_dict["type"]])
            object.__setattr__(obj, "__dict__", message_dict)
        except:
            raise TypeError("Unknown message type") from None

        if not obj._verify():  # pylint: disable=protected-access
            raise TypeError("Invalid message content")

        return obj
972584
def load(cls, fp, **kwargs):
    """"""
    json_obj = json.load(fp, **kwargs)
    return parse(cls, json_obj)
603061
async def load_message_field(obj, msg, field, field_archiver=None):
    
    fname, ftype, params = field[0], field[1], field[2:]
    field_archiver = field_archiver if field_archiver else load_field
    await field_archiver(obj[fname], ftype, params, eref(msg, fname))
959303
protected function loadMessages()
    {
        $messages = Collection::make($this->event->get('messaging'))->filter(function ($msg) {
            return isset($msg['message']) && isset($msg['message']['attachments']) && isset($msg['message']['attachments']);
        })->transform(function ($msg) {
            $message = new IncomingMessage(Audio::PATTERN, $msg['sender']['id'], $msg['recipient']['id'], $msg);
            $message->setAudio($this->getAudioUrls($msg));

            return $message;
        })->toArray();

        if (count($messages) === 0) {
            $messages = [new IncomingMessage('', '', '')];
        }

        $this->messages = $messages;
    }
784343
def from_raw_message(cls, rawmessage):
        """"""
        userdata_dict = Userdata(rawmessage[8:22])
        return ExtendedSend(rawmessage[2:5],
                            {'cmd1': rawmessage[6],
                             'cmd2': rawmessage[7]},
                            userdata_dict,
                            flags=rawmessage[5],
                            acknak=rawmessage[22:23])