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