aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/file_manager.vala9
1 files changed, 7 insertions, 2 deletions
diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala
index 89ae1ce1..984fe5fd 100644
--- a/libdino/src/service/file_manager.vala
+++ b/libdino/src/service/file_manager.vala
@@ -276,8 +276,13 @@ public class FileManager : StreamInteractionModule, Object {
file_transfer.ourpart = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account) ?? conversation.account.bare_jid;
file_transfer.direction = from.equals(file_transfer.ourpart) ? FileTransfer.DIRECTION_SENT : FileTransfer.DIRECTION_RECEIVED;
} else {
- file_transfer.ourpart = conversation.account.full_jid;
- file_transfer.direction = from.equals_bare(file_transfer.ourpart) ? FileTransfer.DIRECTION_SENT : FileTransfer.DIRECTION_RECEIVED;
+ if (from.equals_bare(conversation.account.bare_jid)) {
+ file_transfer.ourpart = from;
+ file_transfer.direction = FileTransfer.DIRECTION_SENT;
+ } else {
+ file_transfer.ourpart = conversation.account.full_jid;
+ file_transfer.direction = FileTransfer.DIRECTION_RECEIVED;
+ }
}
file_transfer.time = time;
file_transfer.local_time = local_time;