From acaacae697059ba23889cc3b82d7eec20df8953f Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 2 Mar 2016 16:04:24 +0000 Subject: [PATCH 1/2] Fix 3pid invite acceptance with desired wording. Fixes https://github.com/vector-im/vector-web/issues/1070 --- src/TextForEvent.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index f2ae22a1bb..19036204a2 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -11,11 +11,12 @@ function textForMemberEvent(ev) { case 'invite': var threePidContent = ev.getContent().third_party_invite; if (threePidContent) { - // TODO: When we have third_party_invite.display_name we should - // do this as "$displayname received the invitation from $sender" - // or equiv - return targetName + " received an invitation from " + senderName + - "."; + if (threePidContent.display_name) { + return targetName + " accepted " + " the invitation for " + + threePidContent.display_name + "."; + } else { + return targetName + " accepted an invitation."; + } } else { return senderName + " invited " + targetName + "."; From 82cdc15faf3e9f958570f8be1fda0cccb4cc2ae3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Mar 2016 11:37:37 +0000 Subject: [PATCH 2/2] unneccessary '+' --- src/TextForEvent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index 19036204a2..869fbcd6a5 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -12,7 +12,7 @@ function textForMemberEvent(ev) { var threePidContent = ev.getContent().third_party_invite; if (threePidContent) { if (threePidContent.display_name) { - return targetName + " accepted " + " the invitation for " + + return targetName + " accepted the invitation for " + threePidContent.display_name + "."; } else { return targetName + " accepted an invitation.";