Return all of the chat 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)
1318587
def get_all(self, request, notifications, mark_as_read=False):
        
        return self.list(request, notifications)
376930
def get_messages(self):
        
        cs = self.data["comments"]["data"]
        res = [] 
        for c in cs:
            res.append(Message(c,self))
        return res
1257731
def messages(path, thread, fmt, nocolor, timezones, utc, noprogress, resolve, directory):
    
    with colorize_output(nocolor):
        try:
            chat_history = _process_history(
                path=path, thread=thread, timezones=timezones,
                utc=utc, noprogress=noprogress, resolve=resolve)
        except ProcessingFailure:
            return
        if directory:
            set_all_color(enabled=False)
        write(fmt, chat_history, directory or sys.stdout)
1248749
def get_replies_to(self, msg):
        
        mid = msg.get_message_id()
        msg_hash = self.get_messages()
        for m in msg_hash.keys():
            if m.get_message_id() == mid:
                return msg_hash[m]
        return None
1118137
def getChat(self, chat_id):
        
        p = _strip(locals())
        return self._api_request('getChat', _rectify(p))
288355
public function get_messages($id_chat, $last = null, $day = null): array
  {
    $res = ['success' => false, 'last' => null, 'messages' => []];
    if ( $this->check() ){
      $dir = BBN_DATA_PATH.'users/'.$this->user->get_id().'/chat/'.$id_chat.'/'.($day ?: date('Y-m-d'));
      if ( $this->is_participant($id_chat) && is_dir($dir) ){
        $res['success'] = true;
        $files = bbn\file\dir::get_files($dir);
        foreach ( $files as $file ){
          $time = (float)basename($file, '.msg');
          if ( (!$last || \bbn\x::compare_floats($time, $last, '>')) && ($st = file_get_contents($file)) ){
            $enc = bbn\util\enc::crypt('test');
            $res['messages'][] = json_decode(bbn\util\enc::decrypt($st), true);
          }
        }
        if ( isset($time) ){
          $res['last'] = $time;
        }
      }
    }
    return $res;
  }
1243033
def messages(self):
        ''''''

        # the file contains the fixed-size file header followed by
        # fixed-size message structures. start after the file header and
        # then simply return the message structures in sequence until the
        # end of the file.

        offset = self.LENGTH
        while offset < len(self.mmap):
            yield Message(mm=self.mmap, offset=offset)
            offset += Message.LENGTH
1187249
def incoming_messages(self) -> t.List[t.Tuple[float, bytes]]:
        
        approximate_messages = self._receive_buffer.qsize()
        messages = []
        for _ in range(approximate_messages):
            try:
                messages.append(self._receive_buffer.get_nowait())
            except queue.Empty:
                break
        return messages
1300
def get_callbacks_from_message(self, msg):
        """"""
        callbacks = []
        for key in self._find_matching_keys(msg):
            for callback in self[key]:
                callbacks.append(callback)
        return callbacks
1168608
def get_messages(self, domain):
        
        if domain not in self.domains:
            raise ValueError('Invalid domain: {0}'.format(domain))

        if domain not in self.messages or 'all' not in self.messages[domain]:
            self._process_domain(domain)

        return self.messages[domain]['all']
723064
def chatlogs_get(self, chat_id, start_date, end_date, charset, session):
        ''''''
        request = TOPRequest('taobao.wangwang.eservice.chatlog.get')
        request['chat_id'] = chat_id
        request['charset'] = charset
        request['start_date'] = start_date
        request['end_date'] = end_date
        self.create(self.execute(request, session))
        return self.chatpeers
1043473
def get_chat(self, chat_id):
        
        result = apihelper.get_chat(self.token, chat_id)
        return types.Chat.de_json(result)
465468
public function getChatCommands()
    {
        $chatCommands = [];
        foreach ($this->commands as $chatCommand => $data) {
            $chatCommands[$data->getCommand()] = clone $data;
        }

        return $chatCommands;
    }
1100777
def get_chat_info(self):
        """"""
        chat_info = self.json_response.get("chat_info", None)
        self.chat_info = chat_info
        self.logger.info("%s\t%s" % (self.request_method, self.request_url))
        return chat_info
1329122
def get_messages(self, *args, **kwargs):
        
        return self.get_content(self.config['messages'], *args, **kwargs)
1355524
async def get_input_chat(self):
        
        if self.input_chat is None and self.chat_id:
            try:
                # The chat may be recent, look in dialogs
                target = self.chat_id
                async for d in self._client.iter_dialogs(100):
                    if d.id == target:
                        self._chat = d.entity
                        self._input_chat = d.input_entity
                        break
            except errors.RPCError:
                pass

        return self._input_chat