feat: Member tag#201730
Open
Davdadev wants to merge 1 commit intowwebjs:mainfrom
Open
Conversation
Author
|
I've tested and it works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add group member tag support (setMemberTag, deleteMemberTag, getMemberTag)
Description
Adds support for WhatsApp's group member tag feature, which was rolled out in January 2026. Member tags allow users to set a custom label that appears under their name in a group chat and participant list (e.g. "Coach", "Organiser", "Project Manager"). Tags are group-specific, so a user can have different tags in different groups.
Changes
GroupChat.js — added three new methods:
setMemberTag(label) — sets or updates your member tag in the group (max 30 chars, plain text only)
deleteMemberTag() — removes your member tag from the group
getMemberTag() — returns your current member tag as a string, or null if not set
index.d.ts — added TypeScript type definitions for all three methods
How it works
Uses WAWebSendMemberLabelAction.sendMemberLabelMsg and WAWebMemberLabelsFrontendUtils.getMyMemberLabelStringForChat, both accessed via window.require() following the existing pattern in Utils.js. No changes to AuthStore.js or any other files were needed.
Deleting a tag is achieved by sending an empty string, matching WhatsApp Web's internal behaviour.
Testing
Manually verified in WhatsApp Web console:
sendMemberLabelMsg returns {messageSendResult: 'OK'} ✅
Tag appears under name in group after calling setMemberTag ✅
getMyMemberLabelStringForChat returns the correct string ✅
Empty string call successfully removes the tag ✅
Notes
Tags are capped at 30 characters and plain text only (no symbols, links, or special characters) — validated before calling the API
This feature requires WhatsApp Web to have rolled out member tags to the account — older sessions may not have access yet