Store Sone following time on following a Sone
[Sone.git] / src / main / java / net / pterodactylus / sone / database / memory / MemoryFriendDatabase.java
index 0be8738..5ab1b28 100644 (file)
@@ -48,6 +48,9 @@ class MemoryFriendDatabase {
                try {
                        if (soneFriends.put(localSoneId, friendSoneId)) {
                                configurationLoader.saveFriends(localSoneId, soneFriends.get(localSoneId));
+                               if (configurationLoader.getSoneFollowingTime(friendSoneId) == null) {
+                                       configurationLoader.setSoneFollowingTime(friendSoneId, System.currentTimeMillis());
+                               }
                        }
                } finally {
                        lock.writeLock().unlock();