aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/file_manager.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/file_manager.vala')
-rw-r--r--libdino/src/service/file_manager.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala
index 5f3db040..7cd9aeaf 100644
--- a/libdino/src/service/file_manager.vala
+++ b/libdino/src/service/file_manager.vala
@@ -42,7 +42,11 @@ public class FileManager : StreamInteractionModule, Object {
FileTransfer file_transfer = new FileTransfer();
file_transfer.account = conversation.account;
file_transfer.counterpart = conversation.counterpart;
- file_transfer.ourpart = conversation.account.bare_jid;
+ if (conversation.type_ in new Conversation.Type[]{Conversation.Type.GROUPCHAT, Conversation.Type.GROUPCHAT_PM}) {
+ file_transfer.ourpart = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account) ?? conversation.account.bare_jid;
+ } else {
+ file_transfer.ourpart = conversation.account.full_jid;
+ }
file_transfer.direction = FileTransfer.DIRECTION_SENT;
file_transfer.time = new DateTime.now_utc();
file_transfer.local_time = new DateTime.now_utc();