aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-03 11:04:17 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-03 11:04:17 +0200
commit4e82f4337e2d7e4e76ea58764b3872ebabea8e86 (patch)
tree0ecb98443eb366c2a2d2a09c870f68b6dc8865cc /src/eu/siacs
parent3db0f688fb699164a2ecb94754041cb4dd28d971 (diff)
added pgp sig on muc rename
Diffstat (limited to 'src/eu/siacs')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 5acde6d4..50e1fc13 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1146,6 +1146,7 @@ public class XmppConnectionService extends Service {
public void renameInMuc(final Conversation conversation, final String nick) {
final MucOptions options = conversation.getMucOptions();
if (options.online()) {
+ Account account = conversation.getAccount();
options.setOnRenameListener(new OnRenameListener() {
@Override
@@ -1166,9 +1167,14 @@ public class XmppConnectionService extends Service {
packet.setAttribute("to",
conversation.getContactJid().split("/")[0] + "/" + nick);
packet.setAttribute("from", conversation.getAccount().getFullJid());
-
- conversation.getAccount().getXmppConnection()
- .sendPresencePacket(packet, null);
+
+ String sig = account.getPgpSignature();
+ if (sig != null) {
+ packet.addChild("status").setContent("online");
+ packet.addChild("x", "jabber:x:signed").setContent(sig);
+ }
+
+ account.getXmppConnection().sendPresencePacket(packet, null);
} else {
String jid = conversation.getContactJid().split("/")[0] + "/"
+ nick;