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 diff --git a/public/javascripts/group-edit.js b/public/javascripts/group-edit.js index e24ff9a47..e5c995bed 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" : true , "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;