(Contact c)
| 1088 | } |
| 1089 | |
| 1090 | public void doSubscribe(Contact c) { |
| 1091 | if (c.subscr == null) { |
| 1092 | c.subscr = "none"; |
| 1093 | } |
| 1094 | boolean subscribe = |
| 1095 | c.subscr.startsWith("none") |
| 1096 | || c.subscr.startsWith("from"); |
| 1097 | if (c.ask_subscribe) { |
| 1098 | subscribe = false; |
| 1099 | } |
| 1100 | |
| 1101 | boolean subscribed = |
| 1102 | c.subscr.startsWith("none") |
| 1103 | || c.subscr.startsWith("to"); |
| 1104 | //getMessage(cursor).messageType==Msg.MESSAGE_TYPE_AUTH; |
| 1105 | |
| 1106 | String to = (JidUtils.isTransport(c.jid)) ? c.getJid().toString() : c.jid.getBare(); |
| 1107 | |
| 1108 | if (subscribed) { |
| 1109 | sendPresence(to, "subscribed", null, false); |
| 1110 | } |
| 1111 | if (subscribe) { |
| 1112 | sendPresence(to, "subscribe", null, false); |
| 1113 | } |
| 1114 | } |
| 1115 | |
| 1116 | public void sendMessage(Contact to, String id, final String body, final String subject, String composingState) { |
| 1117 | AutoStatus.getInstance().userActivity(Config.AWAY_MESSAGE); |
no test coverage detected