Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Neff <benjamin@coding4coffee.ch>2016-05-16 20:57:30 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2016-06-26 07:21:00 +0300
commit581f8d7226e79734f594d13452cd5861aecb5311 (patch)
tree1e7a855ffbf965af4135431d6a08c857ad81b95b /app/controllers
parent102e2a083424c66f0b6cbceb019e6bb2ea7b694a (diff)
don't force remove contact on block
this creates inconsistent states, if you remove the block in the future
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/blocks_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/blocks_controller.rb b/app/controllers/blocks_controller.rb
index bcea0e561..dd5cb4ae9 100644
--- a/app/controllers/blocks_controller.rb
+++ b/app/controllers/blocks_controller.rb
@@ -35,9 +35,7 @@ class BlocksController < ApplicationController
private
def disconnect_if_contact(person)
- if contact = current_user.contact_for(person)
- current_user.disconnect(contact, :force => true)
- end
+ current_user.contact_for(person).try {|contact| current_user.disconnect(contact) }
end
def block_params