feat(engine): Baileys group management + profile + block/unblock (slice 3a)#309
Merged
Conversation
…/leave/subject/description/invite)
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.
Summary
Slice 3a of the Baileys engine: un-gates the storeless live ops — all group management, profile-picture fetch, and block/unblock — via direct Baileys socket calls. No store, no DB, no DI changes.
Stacked on #308 (base branch
feat/baileys-store-ops, itself stacked on #307 → #299). This PR's diff is slice-3a only; the base retargets tomainas the stack merges down.What's added (15 methods, all
ensureReady()-guarded)getGroups(groupFetchAllParticipating, one call — no N+1),getGroupInfo(groupMetadata),createGroup, participant ops (groupParticipantsUpdatewithadd/remove/promote/demote),leaveGroup,setGroupSubject/setGroupDescription,getGroupInviteCode/revokeGroupInviteCode.getProfilePicture(profilePictureUrl→ url, ornullwhen none/hidden).blockContact/unblockContact(updateBlockStatus).baileys-group-mapper(GroupMetadata→ neutralGroup/GroupInfo/GroupParticipant) — the sole Baileys-group→neutral boundary (type-only baileys import, no runtime load, unit-tested without a socket).Group.isAdminis computed by matching the session's own JID against admin/superadmin participants.getFeatures()now advertisesgroup-management.Behavior notes
getGroupInfo/getProfilePicturedegrade tonullon rejection (no such group / no picture / hidden), with adebuglog for operator traceability — matching the neutral| nullcontract.isAnnounce/isReadOnlyare mapped best-effort from Baileys'announceflag (WhatsApp's announce/restrict semantics are fuzzy).Out of scope (still 501)
getContacts/getContactById/getChats/sendSeen/getChatHistory/deleteChat/resolveContactPhone→ the contact/chat-store slice (3b). Labels/channels/status/catalog/getMessageReactionsstay unsupported (parity with the whatsapp-web.js engine, which also stubs them).Testing
sock.*call + args, getGroups/getGroupInfo mapped, getGroupInfo null-on-reject, invite codes, profile url + null, block/unblock action literals,ensureReadypre-connect); the e2e boot-gate feature list synced to the 10-entry set.