aboutsummaryrefslogtreecommitdiff
path: root/src/mod_roster.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_roster.erl')
-rw-r--r--src/mod_roster.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mod_roster.erl b/src/mod_roster.erl
index 9d3974ac7..785f30c76 100644
--- a/src/mod_roster.erl
+++ b/src/mod_roster.erl
@@ -3,7 +3,6 @@
%%% Author : Alexey Shchepin <alexey@sevcom.net>
%%% Purpose : Roster management
%%% Created : 11 Dec 2002 by Alexey Shchepin <alexey@sevcom.net>
-%%% Id : $Id$
%%%----------------------------------------------------------------------
-module(mod_roster).
@@ -434,6 +433,10 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ->
case NewState of
none ->
{none, AutoReply};
+ {none, none} when Item#roster.subscription == none,
+ Item#roster.ask == in ->
+ mnesia:delete({roster, {LUser, LServer, LJID}}),
+ {none, AutoReply};
{Subscription, Pending} ->
NewItem = Item#roster{subscription = Subscription,
ask = Pending,