prefixing the link_id of a notification with a t for time to agree to the new link_id pattern.
authorLennard de Rijk <ljvderijk@gmail.com>
Thu, 29 Jan 2009 15:38:41 +0000
changeset 1059 17221b578fe7
parent 1058 6acbbb68f032
child 1060 eb6231138307
prefixing the link_id of a notification with a t for time to agree to the new link_id pattern. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/logic/helper/notifications.py
app/soc/views/models/notification.py
--- a/app/soc/logic/helper/notifications.py	Thu Jan 29 09:33:50 2009 +0000
+++ b/app/soc/logic/helper/notifications.py	Thu Jan 29 15:38:41 2009 +0000
@@ -143,7 +143,7 @@
       'subject': subject,
       'message' : message,
       'scope' : to_user,
-      'link_id' :'%i' % (time.time()),
+      'link_id' :'t%i' % (time.time()),
       'scope_path' : to_user.link_id
   }
 
--- a/app/soc/views/models/notification.py	Thu Jan 29 09:33:50 2009 +0000
+++ b/app/soc/views/models/notification.py	Thu Jan 29 15:38:41 2009 +0000
@@ -163,7 +163,7 @@
     # get the current user
     current_user = user_logic.logic.getForCurrentAccount()
 
-    fields['link_id'] = '%i' % (time.time())
+    fields['link_id'] = 't%i' % (time.time())
     fields['scope'] = fields['to_user']
     fields['from_user'] = current_user
     fields['scope_path'] = fields['to_user'].link_id