MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / doSubscribe

Method doSubscribe

src/main/java/Client/Roster.java:1090–1114  ·  view source on GitHub ↗
(Contact c)

Source from the content-addressed store, hash-verified

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);

Callers 2

storeContactMethod · 0.95
menuActionMethod · 0.80

Calls 5

isTransportMethod · 0.95
sendPresenceMethod · 0.95
getBareMethod · 0.80
toStringMethod · 0.45
getJidMethod · 0.45

Tested by

no test coverage detected