diff --git a/js/background.js b/js/background.js index 555e2ebe0..36741687e 100644 --- a/js/background.js +++ b/js/background.js @@ -698,7 +698,7 @@ return; } - const nullAvatar = ''; + const nullAvatar = undefined; if (avatar) { // would get to download this file on each client in the group // and reference the local file @@ -771,7 +771,7 @@ recipients: allMembers, active: true, expireTimer: 0, - avatar: '', + avatar: undefined, }; await window.NewReceiver.onGroupReceived(groupDetails); diff --git a/ts/components/session/LeftPaneMessageSection.tsx b/ts/components/session/LeftPaneMessageSection.tsx index d634e46ba..9b33e50cf 100644 --- a/ts/components/session/LeftPaneMessageSection.tsx +++ b/ts/components/session/LeftPaneMessageSection.tsx @@ -511,6 +511,7 @@ export class LeftPaneMessageSection extends React.Component { this.setState({ loading: false, }); + this.handleToggleOverlay(undefined); } } diff --git a/ts/components/session/SessionClosableOverlay.tsx b/ts/components/session/SessionClosableOverlay.tsx index b70853766..a6ca82b3e 100644 --- a/ts/components/session/SessionClosableOverlay.tsx +++ b/ts/components/session/SessionClosableOverlay.tsx @@ -74,7 +74,7 @@ export class SessionClosableOverlay extends React.Component { overlayMode === SessionClosableOverlayType.ClosedGroup; if (isClosedGroupView) { filteredContactsList = filteredContactsList.filter( - c => c.type === 'direct' + c => c.type === 'direct' && !c.isMe ); } diff --git a/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts b/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts index 612f69eee..0664a0516 100644 --- a/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts +++ b/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts @@ -43,6 +43,13 @@ export abstract class ClosedGroupUpdateMessage extends ClosedGroupMessage { throw new Error('admins has not the correct type'); } + if ( + params.avatar !== undefined && + !(params.avatar instanceof SignalService.AttachmentPointer) + ) { + throw new Error('avatar has not the correct type'); + } + this.name = params.name; this.members = params.members; this.admins = params.admins;