From 08233a74c51ba601ead579644fc50686848af541 Mon Sep 17 00:00:00 2001 From: maxwell Date: Sat, 11 Sep 2010 14:39:09 -0700 Subject: [PATCH 2/4] MS added anohter logger so i can debug friend requests --- app/models/user.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/user.rb b/app/models/user.rb index c767e3b91..6f53be3c6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -204,6 +204,7 @@ class User Rails.logger.info("Received a salmon: #{cleartext}") salmon = Salmon::SalmonSlap.parse cleartext if salmon.verified_for_key?(salmon.author.public_key) + Rails.logger.info("data in salmon: #{salmon.data}") self.receive(salmon.data) end end From b1dcc4cf431e65fee89b3f1a161309c7a85e1f2c Mon Sep 17 00:00:00 2001 From: ilya Date: Sat, 11 Sep 2010 21:58:01 -0700 Subject: [PATCH 3/4] testing request acceptance on remote --- public/javascripts/group-edit.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/javascripts/group-edit.js b/public/javascripts/group-edit.js index e24ff9a47..4b2c43451 100644 --- a/public/javascripts/group-edit.js +++ b/public/javascripts/group-edit.js @@ -16,6 +16,14 @@ $(function() { $(".group ul").droppable({ drop: function(event, ui) { + if (ui.draggable[0].getAttribute('request_id') != null){ + $.ajax({ + type: "DELETE", + url: "/requests/" + ui.draggable[0].getAttribute('request_id') , + data: {"accept" : {"group_id" : $(this)[0].id }} + }); + alert("Sent the ajax, check it out!") + } var move = {}; move[ 'friend_id' ] = ui.draggable[0].id move[ 'to' ] = $(this)[0].id; From 9b07c780c3e5893c1908e48613526503f775926f Mon Sep 17 00:00:00 2001 From: ilya Date: Sat, 11 Sep 2010 23:31:43 -0700 Subject: [PATCH 4/4] the acceptance now works need to do the ignores and unfriend bucket --- public/javascripts/group-edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/group-edit.js b/public/javascripts/group-edit.js index 4b2c43451..e5c995bed 100644 --- a/public/javascripts/group-edit.js +++ b/public/javascripts/group-edit.js @@ -20,7 +20,7 @@ $(function() { $.ajax({ type: "DELETE", url: "/requests/" + ui.draggable[0].getAttribute('request_id') , - data: {"accept" : {"group_id" : $(this)[0].id }} + data: {"accept" : true , "group_id" : $(this)[0].id } }); alert("Sent the ajax, check it out!") }