added pgp sig on muc rename

This commit is contained in:
iNPUTmice 2014-06-03 11:04:17 +02:00
parent 3db0f688fb
commit 4e82f4337e
1 changed files with 9 additions and 3 deletions

View File

@ -1146,6 +1146,7 @@ public class XmppConnectionService extends Service {
public void renameInMuc(final Conversation conversation, final String nick) { public void renameInMuc(final Conversation conversation, final String nick) {
final MucOptions options = conversation.getMucOptions(); final MucOptions options = conversation.getMucOptions();
if (options.online()) { if (options.online()) {
Account account = conversation.getAccount();
options.setOnRenameListener(new OnRenameListener() { options.setOnRenameListener(new OnRenameListener() {
@Override @Override
@ -1167,8 +1168,13 @@ public class XmppConnectionService extends Service {
conversation.getContactJid().split("/")[0] + "/" + nick); conversation.getContactJid().split("/")[0] + "/" + nick);
packet.setAttribute("from", conversation.getAccount().getFullJid()); packet.setAttribute("from", conversation.getAccount().getFullJid());
conversation.getAccount().getXmppConnection() String sig = account.getPgpSignature();
.sendPresencePacket(packet, null); if (sig != null) {
packet.addChild("status").setContent("online");
packet.addChild("x", "jabber:x:signed").setContent(sig);
}
account.getXmppConnection().sendPresencePacket(packet, null);
} else { } else {
String jid = conversation.getContactJid().split("/")[0] + "/" String jid = conversation.getContactJid().split("/")[0] + "/"
+ nick; + nick;