public void approveSubscription(String to, String nickname, boolean shouldRequest) throws SmackInvocationException { contactHelper.approveSubscription(to); if (shouldRequest) { requestSubscription(to, nickname); } }
public SubscribeInfo processSubscribe(String from) throws SmackInvocationException { SubscribeInfo result = new SubscribeInfo(); RosterEntry rosterEntry = contactHelper.getRosterEntry(from); ItemType rosterType = rosterEntry != null ? rosterEntry.getType() : null; if (rosterEntry == null || rosterType == ItemType.none) { result.setType(SubscribeInfo.TYPE_WAIT_FOR_APPROVAL); result.setNickname(getNickname(from)); } else if (rosterType == ItemType.to) { result.setType(SubscribeInfo.TYPE_APPROVED); result.setNickname(rosterEntry.getName()); approveSubscription(from, null, false); } result.setFrom(from); return result; }
public void saveStatus(String status) throws SmackInvocationException { vCardHelper.saveStatus(status); contactHelper.broadcastStatus(status); }
public void delete(String jid) throws SmackInvocationException { contactHelper.delete(jid); }
public void requestSubscription(String to, String nickname) throws SmackInvocationException { contactHelper.requestSubscription(to, nickname); }