mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
rm forced leave
This commit is contained in:
parent
235d4200bd
commit
400e1ee0a8
|
@ -165,20 +165,6 @@
|
|||
// Close group leaving
|
||||
if (conversation.isClosedGroup()) {
|
||||
await conversation.leaveGroup();
|
||||
|
||||
const deviceIds = await textsecure.storage.protocol.getDeviceIds(id);
|
||||
|
||||
await Promise.all(
|
||||
deviceIds.map(deviceId => {
|
||||
const address = new libsignal.SignalProtocolAddress(id, deviceId);
|
||||
const sessionCipher = new libsignal.SessionCipher(
|
||||
textsecure.storage.protocol,
|
||||
address
|
||||
);
|
||||
|
||||
return sessionCipher.deleteAllSessionsForDevice();
|
||||
})
|
||||
);
|
||||
} else if (conversation.isPublic()) {
|
||||
const channelAPI = await conversation.getPublicSendData();
|
||||
if (channelAPI === null) {
|
||||
|
|
|
@ -441,22 +441,15 @@ export class ConversationHeader extends React.Component<Props> {
|
|||
isGroup,
|
||||
isFriend,
|
||||
isKickedFromGroup,
|
||||
// isArchived,
|
||||
isPublic,
|
||||
isRss,
|
||||
onResetSession,
|
||||
onSetDisappearingMessages,
|
||||
// onShowAllMedia,
|
||||
onShowGroupMembers,
|
||||
onShowSafetyNumber,
|
||||
// onArchive,
|
||||
// onMoveToInbox,
|
||||
timerOptions,
|
||||
onBlockUser,
|
||||
onUnblockUser,
|
||||
// hasNickname,
|
||||
// onClearNickname,
|
||||
// onChangeNickname,
|
||||
} = this.props;
|
||||
|
||||
if (isPublic || isRss) {
|
||||
|
@ -499,34 +492,14 @@ export class ConversationHeader extends React.Component<Props> {
|
|||
const blockHandlerMenuItem = !isMe &&
|
||||
!isGroup &&
|
||||
!isRss && <MenuItem onClick={blockHandler}>{blockTitle}</MenuItem>;
|
||||
// const changeNicknameMenuItem = !isMe &&
|
||||
// !isGroup && (
|
||||
// <MenuItem onClick={onChangeNickname}>{i18n('changeNickname')}</MenuItem>
|
||||
// );
|
||||
// const clearNicknameMenuItem = !isMe &&
|
||||
// !isGroup &&
|
||||
// hasNickname && (
|
||||
// <MenuItem onClick={onClearNickname}>{i18n('clearNickname')}</MenuItem>
|
||||
// );
|
||||
// const archiveConversationMenuItem = isArchived ? (
|
||||
// <MenuItem onClick={onMoveToInbox}>
|
||||
// {i18n('moveConversationToInbox')}
|
||||
// </MenuItem>
|
||||
// ) : (
|
||||
// <MenuItem onClick={onArchive}>{i18n('archiveConversation')}</MenuItem>
|
||||
// );
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{/* <MenuItem onClick={onShowAllMedia}>{i18n('viewAllMedia')}</MenuItem> */}
|
||||
{disappearingMessagesMenuItem}
|
||||
{showMembersMenuItem}
|
||||
{showSafetyNumberMenuItem}
|
||||
{resetSessionMenuItem}
|
||||
{blockHandlerMenuItem}
|
||||
{/* {changeNicknameMenuItem}
|
||||
{clearNicknameMenuItem} */}
|
||||
{/* {archiveConversationMenuItem} */}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue