aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/message_processor.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-23 20:30:44 +0200
committerfiaxh <git@mx.ax.lt>2017-08-25 22:29:40 +0200
commit5fcf8e73efeea60413a383e6e6a096a3981be1a2 (patch)
tree8f7aa88a0b167d46a90c2966b3ea15959a8a4014 /libdino/src/service/message_processor.vala
parent7b395263c1ec0e6b057f7c3bb1d0525f6f38964d (diff)
downloaddino-5fcf8e73efeea60413a383e6e6a096a3981be1a2.tar.gz
dino-5fcf8e73efeea60413a383e6e6a096a3981be1a2.zip
Show nicks in MUCs, real jid in individual occupant menu
Diffstat (limited to 'libdino/src/service/message_processor.vala')
-rw-r--r--libdino/src/service/message_processor.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala
index cc99bcc3..2bf3d615 100644
--- a/libdino/src/service/message_processor.vala
+++ b/libdino/src/service/message_processor.vala
@@ -167,7 +167,12 @@ public class MessageProcessor : StreamInteractionModule, Object {
message.local_time = new DateTime.now_local();
message.direction = Entities.Message.DIRECTION_SENT;
message.counterpart = conversation.counterpart;
- message.ourpart = new Jid(conversation.account.bare_jid.to_string() + "/" + conversation.account.resourcepart);
+ if (conversation.type_ in new Conversation.Type[]{Conversation.Type.GROUPCHAT, Conversation.Type.GROUPCHAT_PM}) {
+ message.ourpart = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account);
+ message.real_jid = conversation.account.bare_jid;
+ } else {
+ message.ourpart = new Jid.with_resource(conversation.account.bare_jid.to_string(), conversation.account.resourcepart);
+ }
message.marked = Entities.Message.Marked.UNSENT;
message.encryption = conversation.encryption;