diff options
author | Marvin W <git@larma.de> | 2019-12-23 23:13:27 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-12-23 23:13:27 +0100 |
commit | cf1c7d3af2ce6324b93f95d68fcffaebcc4a2603 (patch) | |
tree | 33b16678e0f64c980b49daf8a98d489bb0970df4 /libdino/src/service/file_manager.vala | |
parent | 4185da3b99cfdfba331a2cc0b6bdbd1bed63845e (diff) | |
download | dino-cf1c7d3af2ce6324b93f95d68fcffaebcc4a2603.tar.gz dino-cf1c7d3af2ce6324b93f95d68fcffaebcc4a2603.zip |
Display correct name on outgoing file transfers in groups
Fixes #248, #643
Diffstat (limited to 'libdino/src/service/file_manager.vala')
-rw-r--r-- | libdino/src/service/file_manager.vala | 6 |
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(); |