Beispiel #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"])
Beispiel #2
0
 def getUpdateTime(self):
     return rcTimeToDatetime(self.m_data["_updatedAt"]["$date"])
Beispiel #3
0
 def getEditTime(self):
     date = self.m_data.get('editedAt', {"$date": 0})["$date"]
     return rcTimeToDatetime(date)
Beispiel #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"])
Beispiel #5
0
 def getClientTimestamp(self):
     return rcTimeToDatetime(self.m_data["ts"]["$date"])
Beispiel #6
0
 def getPinningTime(self):
     if "ts" in self.m_pinned_data:
         return rcTimeToDatetime(self.m_pinned_data["ts"]["$date"])
     else:
         return None
Beispiel #7
0
 def getLastLogin(self):
     return rcTimeToDatetime(self.m_data["lastLogin"])