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

Fix invites to groups without names #1505

Merged
merged 1 commit into from
Oct 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/views/avatars/BaseAvatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = React.createClass({

let idx = 0;
const initial = name[0];
if ((initial === '@' || initial === '#') && name[1]) {
if ((initial === '@' || initial === '#' || initial === '+') && name[1]) {
idx++;
}

Expand Down
12 changes: 5 additions & 7 deletions src/components/views/groups/GroupInviteTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,17 @@ export default React.createClass({
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const EmojiText = sdk.getComponent('elements.EmojiText');

const av = (
<BaseAvatar name={this.props.group.name} width={24} height={24}
url={this.props.group.avatarUrl}
/>
);
const groupName = this.props.group.name || this.props.group.groupId;

const av = <BaseAvatar name={groupName} width={24} height={24} url={this.props.group.avatarUrl} />;

const label = <EmojiText
element="div"
title={this.props.group.name}
title={groupName}
className="mx_GroupInviteTile_name"
dir="auto"
>
{ this.props.group.name }
{ groupName }
</EmojiText>;

const badge = <div className="mx_GroupInviteTile_badge">!</div>;
Expand Down