Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1318 from matrix-org/luke/fix-widget-event-name
Browse files Browse the repository at this point in the history
Add a space between widget name and "widget" in widget event tiles
  • Loading branch information
lukebarnard1 committed Aug 18, 2017
2 parents 942656d + 7a277bf commit 273abd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TextForEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ function textForWidgetEvent(event) {
const senderName = event.sender ? event.sender.name : event.getSender();
const previousContent = event.getPrevContent() || {};
const {name, type, url} = event.getContent() || {};
const widgetName = widgetName || name || type || previousContent.type || '';
let widgetName = widgetName || name || type || previousContent.type;
widgetName = widgetName ? widgetName + ' ' : '';

// If the widget was removed, its content should be {}, but this is sufficiently
// equivalent to that condition.
Expand Down

0 comments on commit 273abd9

Please sign in to comment.