From 2f438c799c1e9d05c215157e8f8c61ac3d1e598e Mon Sep 17 00:00:00 2001 From: Aldino Kemal Date: Mon, 23 Jun 2025 21:19:47 +0700 Subject: [PATCH] chore: bump app version to v6.1.1 and refactor admin check logic - Incremented application version to v6.1.1 in settings.go. - Refactored isAdmin function in GroupList.js to check both group owner and participant admin status. --- src/config/settings.go | 2 +- src/views/components/GroupList.js | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) 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) }}
- +