Ejemplo n.º 1
0
    def getDiscussionLastModified(self):
        """Returns a datetime object representing the last modification time
        of the discussion."""
        if not self.getMessageType() == MessageType.DiscussionCreated:
            raise Exception("Not a discussion type message")

        return rcTimeToDatetime(self.m_data["dlm"]["$date"])
Ejemplo n.º 2
0
 def getUpdateTime(self):
     return rcTimeToDatetime(self.m_data["_updatedAt"]["$date"])
Ejemplo n.º 3
0
 def getEditTime(self):
     date = self.m_data.get('editedAt', {"$date": 0})["$date"]
     return rcTimeToDatetime(date)
Ejemplo n.º 4
0
 def getServerTimestamp(self):
     """This server timestamp may consider updates like reactions
     etc. so it is not the creation time stamp. Use
     getClientTimestamp() for this."""
     return rcTimeToDatetime(self.m_data["_updatedAt"]["$date"])
Ejemplo n.º 5
0
 def getClientTimestamp(self):
     return rcTimeToDatetime(self.m_data["ts"]["$date"])
Ejemplo n.º 6
0
 def getPinningTime(self):
     if "ts" in self.m_pinned_data:
         return rcTimeToDatetime(self.m_pinned_data["ts"]["$date"])
     else:
         return None
Ejemplo n.º 7
0
 def getLastLogin(self):
     return rcTimeToDatetime(self.m_data["lastLogin"])