|
|
@@ -193,6 +193,7 @@ module.exports = {
|
|
193
|
193
|
friend = friend.toLowerCase();
|
|
194
|
194
|
self.get_user_from_auth(auth, function (username) {
|
|
195
|
195
|
if (username) {
|
|
|
196
|
+ if (username.toLowerCase() === friend.toLowerCase()) {
|
|
196
|
197
|
self.get_public_user_info(username, function (userdata) {
|
|
197
|
198
|
var friends = userdata.user.friends;
|
|
198
|
199
|
if (friends.indexOf(friend) > -1) {
|
|
|
@@ -218,6 +219,12 @@ module.exports = {
|
|
218
|
219
|
});
|
|
219
|
220
|
}
|
|
220
|
221
|
});
|
|
|
222
|
+ } else {
|
|
|
223
|
+ complete({
|
|
|
224
|
+ "success": 0,
|
|
|
225
|
+ "error": 4
|
|
|
226
|
+ });
|
|
|
227
|
+ }
|
|
221
|
228
|
} else {
|
|
222
|
229
|
complete({
|
|
223
|
230
|
"success": 0,
|