Share with friends from sframe and drive

This commit is contained in:
yflory
2019-06-04 15:57:39 +02:00
parent 41c3b38a11
commit c154d020b2
10 changed files with 119 additions and 157 deletions

View File

@@ -422,6 +422,19 @@ define([
return JSON.parse(JSON.stringify(friendRequests));
};
funcs.getFriends = function () {
var priv = ctx.metadataMgr.getPrivateData();
var friends = priv.friends;
var goodFriends = {};
Object.keys(friends).forEach(function (curve) {
if (curve.length !== 44) { return; }
var data = friends[curve];
if (!data.notifications) { return; }
goodFriends[curve] = friends[curve];
});
return goodFriends;
};
// Feedback
funcs.prepareFeedback = function (key) {
if (typeof(key) !== 'string') { return $.noop; }