From 7f0de11bd5d95a9ff3abc886328b90f15c5851a8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 11 Sep 2018 12:57:36 +0200 Subject: [PATCH] Better shared-by info for conversations without names Signed-off-by: Joas Schilling --- core/js/sharedialogresharerinfoview.js | 32 ++++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/core/js/sharedialogresharerinfoview.js b/core/js/sharedialogresharerinfoview.js index 06e18fef3f..b2d5a09399 100644 --- a/core/js/sharedialogresharerinfoview.js +++ b/core/js/sharedialogresharerinfoview.js @@ -100,16 +100,28 @@ {escape: false} ); } else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_ROOM) { - sharedByText = t( - 'core', - 'Shared with you and the conversation {conversation} by {owner}', - { - conversation: this.model.getReshareWithDisplayName(), - owner: ownerDisplayName - }, - undefined, - {escape: false} - ); + if (this.model.get('reshare').share_with_displayname) { + sharedByText = t( + 'core', + 'Shared with you and the conversation {conversation} by {owner}', + { + conversation: this.model.getReshareWithDisplayName(), + owner: ownerDisplayName + }, + undefined, + {escape: false} + ); + } else { + sharedByText = t( + 'core', + 'Shared with you in a conversation by {owner}', + { + owner: ownerDisplayName + }, + undefined, + {escape: false} + ); + } } else { sharedByText = t( 'core',