diff --git a/src/config/settings.go b/src/config/settings.go index 50252e3..3da9376 100644 --- a/src/config/settings.go +++ b/src/config/settings.go @@ -5,7 +5,7 @@ import ( ) var ( - AppVersion = "v6.1.0" + AppVersion = "v6.1.1" AppPort = "3000" AppDebug = false AppOs = "AldinoKemal" diff --git a/src/views/components/GroupList.js b/src/views/components/GroupList.js index 3fe44c2..5cb9969 100644 --- a/src/views/components/GroupList.js +++ b/src/views/components/GroupList.js @@ -80,9 +80,17 @@ export default { if (!value) return '' return moment(value).format('LLL'); }, - isAdmin(ownerJID) { - const owner = ownerJID.split('@')[0]; - return owner === this.currentUserId; + isAdmin(group) { + // Check if current user is the owner + const owner = group.OwnerJID.split('@')[0]; + if (owner === this.currentUserId) { + return true; + } + + // Check if current user is an admin in participants + const currentUserJID = `${this.currentUserId}@s.whatsapp.net`; + const participant = group.Participants.find(p => p.JID === currentUserJID); + return participant && participant.IsAdmin; }, async handleSeeRequestedMember(group_id) { this.selectedGroupId = group_id; @@ -180,7 +188,7 @@ export default { {{ formatDate(g.GroupCreated) }}
- +