diff options
author | fiaxh <git@lightrise.org> | 2023-03-23 10:17:42 -0600 |
---|---|---|
committer | Marvin W <git@larma.de> | 2023-03-23 12:14:22 -0600 |
commit | 65efaca6fdcbc788060a0ecc4f7e10fbf5b79669 (patch) | |
tree | f35cbaf0bfd5d3ed0a48b5a7852c3dd507ab9d04 /libdino | |
parent | ef8fb0e94ce79d5fde2943e433ad0422eb7f70ec (diff) | |
download | dino-65efaca6fdcbc788060a0ecc4f7e10fbf5b79669.tar.gz dino-65efaca6fdcbc788060a0ecc4f7e10fbf5b79669.zip |
Fix images from another client in our account not being displayed right away
Diffstat (limited to 'libdino')
-rw-r--r-- | libdino/src/service/file_manager.vala | 9 |
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; |