105 item.ask = nil; |
105 item.ask = nil; |
106 return datamanager.store(username, host, "roster", roster); |
106 return datamanager.store(username, host, "roster", roster); |
107 end |
107 end |
108 end |
108 end |
109 |
109 |
|
110 function process_inbound_subscription_cancellation(username, host, jid) |
|
111 local roster = load_roster(username, host); |
|
112 local item = roster[jid]; |
|
113 if item and (item.subscription == "to" or item.subscription == "both") then |
|
114 if item.subscription == "to" then |
|
115 item.subscription = "none"; |
|
116 else |
|
117 item.subscription = "from"; |
|
118 end |
|
119 -- FIXME do we need to item.ask = nil;? |
|
120 return datamanager.store(username, host, "roster", roster); |
|
121 end |
|
122 end |
|
123 |
110 return _M; |
124 return _M; |