send caps hash in muc join
this prevents desktop clients from iq'ing use when they join
This commit is contained in:
parent
018f978a22
commit
540f6f3d7a
|
@ -1838,8 +1838,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
||||||
final MucOptions mucOptions = conversation.getMucOptions();
|
final MucOptions mucOptions = conversation.getMucOptions();
|
||||||
final Jid joinJid = mucOptions.getSelf().getFullJid();
|
final Jid joinJid = mucOptions.getSelf().getFullJid();
|
||||||
Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": joining conversation " + joinJid.toString());
|
Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": joining conversation " + joinJid.toString());
|
||||||
PresencePacket packet = new PresencePacket();
|
PresencePacket packet = mPresenceGenerator.selfPresence(account, Presence.Status.ONLINE);
|
||||||
packet.setFrom(conversation.getAccount().getJid());
|
|
||||||
packet.setTo(joinJid);
|
packet.setTo(joinJid);
|
||||||
Element x = packet.addChild("x", "http://jabber.org/protocol/muc");
|
Element x = packet.addChild("x", "http://jabber.org/protocol/muc");
|
||||||
if (conversation.getMucOptions().getPassword() != null) {
|
if (conversation.getMucOptions().getPassword() != null) {
|
||||||
|
@ -1853,10 +1852,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
||||||
// Fallback to muc history
|
// Fallback to muc history
|
||||||
x.addChild("history").setAttribute("since", PresenceGenerator.getTimestamp(conversation.getLastMessageTransmitted()));
|
x.addChild("history").setAttribute("since", PresenceGenerator.getTimestamp(conversation.getLastMessageTransmitted()));
|
||||||
}
|
}
|
||||||
String sig = account.getPgpSignature();
|
|
||||||
if (sig != null) {
|
|
||||||
packet.addChild("x", "jabber:x:signed").setContent(sig);
|
|
||||||
}
|
|
||||||
sendPresencePacket(account, packet);
|
sendPresencePacket(account, packet);
|
||||||
if (onConferenceJoined != null) {
|
if (onConferenceJoined != null) {
|
||||||
onConferenceJoined.onConferenceJoined(conversation);
|
onConferenceJoined.onConferenceJoined(conversation);
|
||||||
|
|
Loading…
Reference in a new issue