def parseResponse(self): # Get the timestamp we should send to the server next time we make a request. lastSeenPattern = PatternManager.getOrCompilePattern("chatLastSeen") match = lastSeenPattern.search(self.responseText) self.responseData["lastSeen"] = match.group(1) # Parse the chat messages. text = self.responseText[:self.responseText.find('<!--lastseen')] self.responseData["chatMessages"] = ChatUtils.parseMessages(self.responseText)
def parseResponse(self): # Get the timestamp we should send to the server next time we make a request. lastSeenPattern = PatternManager.getOrCompilePattern("chatLastSeen") match = lastSeenPattern.search(self.responseText) self.responseData["lastSeen"] = match.group(1) # Parse the chat messages. text = self.responseText[:self.responseText.find('<!--lastseen')] self.responseData["chatMessages"] = ChatUtils.parseMessages(self.responseText, True) # Trace out unknown messages. for chat in self.responseData["chatMessages"]: if chat["type"] == "unknown": Report.trace("chat", "Unable to parse chat message: %s" % chat)
def parseResponse(self): # Get the timestamp we should send to the server next time we make a request. lastSeenPattern = PatternManager.getOrCompilePattern("chatLastSeen") match = lastSeenPattern.search(self.responseText) self.responseData["lastSeen"] = match.group(1) # Parse the chat messages. text = self.responseText[:self.responseText.find('<!--lastseen')] self.responseData["chatMessages"] = ChatUtils.parseMessages( self.responseText, True) # Trace out unknown messages. for chat in self.responseData["chatMessages"]: if chat["type"] == "unknown": Report.trace("chat", "Unable to parse chat message: %s" % chat)
def parseResponse(self): # Parse the chat messages returned. self.responseData["chatMessages"] = ChatUtils.parseMessages(self.responseText)
def parseResponse(self): # Parse the chat messages returned. self.responseData["chatMessages"] = ChatUtils.parseMessages( self.responseText, False)