This file is indexed.

/usr/share/doc/python-jabber/patches/unused/JacobLundqvist/time_stamp_v0.3.1.diff is in python-jabber 0.5.0-1.6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- diffed/ustr	2003-01-12 22:44:00.000000000 +0100
+++ jabber.py	2003-01-12 22:51:01.000000000 +0100
@@ -893,7 +893,8 @@
         """Returns the x namespace, optionally passed an index if there are
            multiple tags."""
         ## TODO make it work for multiple x nodes
-        try: return self._node.getTag('x').namespace
+        # jaclu 021231 commented out .namespace to get timestamps working
+        try: return self._node.getTag('x') #.namespace
         except: return None
 
 
@@ -986,8 +987,15 @@
     """Builds on the Protocol class to provide an interface for sending
        message protocol elements"""
     def __init__(self, to=None, body=None, node=None):
+        self.time_stamp = None
         if node:
             self._node = node
+            # examine x tag and set timestamp if pressent
+            x = self._node.getTag('x')
+            if x:
+                ts = x.getAttr('stamp')
+                if ts:
+                    self.setTimestamp( ts )
         else:
             self._node = xmlstream.Node(tag='message')
         if to: self.setTo(str(to))
@@ -1026,8 +1034,7 @@
 
 
     def getTimestamp(self):
-        """Not yet implemented."""
-        pass
+        return self.time_stamp
 
 
     def setBody(self,val):
@@ -1069,8 +1076,9 @@
 
 
     def setTimestamp(self,val):
-        """Not yet implemented."""
-        pass
+        if not val:
+            val = time.strftime( '%Y%m%dT%H:%M:%S', time.gmtime( time.time()))
+        self.time_stamp = val
 
 
     def build_reply(self, reply_txt=''):