Skip to content

feat: Member tag#201730

Open
Davdadev wants to merge 1 commit intowwebjs:mainfrom
Davdadev:main
Open

feat: Member tag#201730
Davdadev wants to merge 1 commit intowwebjs:mainfrom
Davdadev:main

Conversation

@Davdadev
Copy link
Copy Markdown

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

@github-actions github-actions Bot added api changes API modifications typings Type definitions labels Apr 27, 2026
@Davdadev Davdadev changed the title MEMBER TAG UPDATE Member tag Apr 27, 2026
@Davdadev Davdadev changed the title Member tag feat:Member tag Apr 27, 2026
@Davdadev Davdadev changed the title feat:Member tag feat: Member tag Apr 27, 2026
@Davdadev
Copy link
Copy Markdown
Author

I've tested and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api changes API modifications typings Type definitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants