From 01df55e6de24b674ccb6f2df52a834ce89423df9 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 9 Jul 2015 14:58:19 +0200 Subject: [PATCH] Fixed bug: Closed direct-message tickets get reopened instead of not-closed reused. --- lib/tweet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tweet.rb b/lib/tweet.rb index 8c75b3a6b..9be9240be 100644 --- a/lib/tweet.rb +++ b/lib/tweet.rb @@ -99,7 +99,7 @@ class Tweet if tweet.class.to_s == 'Twitter::DirectMessage' ticket = Ticket.find_by( customer_id: user.id, - state: Ticket::State.where( + state: Ticket::State.where.not( state_type_id: Ticket::StateType.where( name: 'closed', )