Merge pull request #1793 from Brice-W/group-edition-fix

Fix for name change and adding members in groups
pull/1795/head
Audric Ackermann 4 years ago committed by GitHub
commit 77a6be3432
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,7 +122,7 @@ const HeaderItem = () => {
avatarPath, avatarPath,
isPublic, isPublic,
id, id,
weAreAdmin, isGroup,
isKickedFromGroup, isKickedFromGroup,
profileName, profileName,
phoneNumber, phoneNumber,
@ -131,7 +131,7 @@ const HeaderItem = () => {
name, name,
} = selectedConversation; } = selectedConversation;
const showInviteContacts = (isPublic || weAreAdmin) && !isKickedFromGroup && !isBlocked && !left; const showInviteContacts = isGroup && !isKickedFromGroup && !isBlocked && !left;
const userName = name || profileName || phoneNumber; const userName = name || profileName || phoneNumber;
return ( return (
@ -249,9 +249,9 @@ export const SessionRightPanelWithDetails = () => {
}; };
}); });
const showUpdateGroupNameButton = weAreAdmin && !commonNoShow; const showUpdateGroupNameButton =
isGroup && (!isPublic || (isPublic && weAreAdmin)) && !commonNoShow;
const showAddRemoveModeratorsButton = weAreAdmin && !commonNoShow && isPublic; const showAddRemoveModeratorsButton = weAreAdmin && !commonNoShow && isPublic;
const showUpdateGroupMembersButton = !isPublic && isGroup && !commonNoShow; const showUpdateGroupMembersButton = !isPublic && isGroup && !commonNoShow;
const deleteConvoAction = isPublic const deleteConvoAction = isPublic

@ -1114,7 +1114,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
} }
public isAdmin(pubKey?: string) { public isAdmin(pubKey?: string) {
if (!this.isPublic()) { if (!this.isPublic() && !this.isGroup()) {
return false; return false;
} }
if (!pubKey) { if (!pubKey) {

Loading…
Cancel
Save