Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit e41eba5

Browse files
committed
Timestamp profile updates
1 parent 6b535cf commit e41eba5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/restapi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import obelisk
66
import nacl.encoding
7+
import time
78
from binascii import unhexlify
89
from collections import OrderedDict
910
from functools import wraps
@@ -172,7 +173,8 @@ def parse_profile(profile, temp_handle=None):
172173
"pgp_key": profile.pgp_key.public_key,
173174
"avatar_hash": profile.avatar_hash.encode("hex"),
174175
"header_hash": profile.header_hash.encode("hex"),
175-
"social_accounts": {}
176+
"social_accounts": {},
177+
"last_modified": profile.last_modified
176178
}
177179
}
178180
if temp_handle:
@@ -446,6 +448,7 @@ def update_profile(self, request):
446448
key.public_key = self.keychain.verify_key.encode()
447449
key.signature = self.keychain.signing_key.sign(key.public_key)[:64]
448450
u.guid_key.MergeFrom(key)
451+
u.last_modified = int(time.time())
449452
p.update(u)
450453
request.write(json.dumps({"success": True}))
451454
request.finish()

0 commit comments

Comments
 (0)