core/rostermanager.lua

changeset 174
f9aff1fc7e99
parent 173
f3a2af4d2ff2
child 176
e5cd2a03891d
equal deleted inserted replaced
173:f3a2af4d2ff2 174:f9aff1fc7e99
133 item.ask = nil; 133 item.ask = nil;
134 return datamanager.store(username, host, "roster", roster); 134 return datamanager.store(username, host, "roster", roster);
135 end 135 end
136 end 136 end
137 137
138 function is_contact_subscribed(username, host, jid)
139 local roster = load_roster(username, host);
140 local item = roster[jid];
141 return item and (item.subscription == "from" or item.subscription == "both");
142 end
143
138 return _M; 144 return _M;

mercurial