Skip to content

Expose LID→phone mapping in API to merge @lid + phone JIDs #260

@pabloruano

Description

@pabloruano

Problem
In WuzAPI, the same 1:1 contact can appear as both:

This causes duplicate chats and split message history in client apps. The mapping exists in the WhatsMeow store (whatsmeow_lid_map with lid -> pn), but it’s not exposed in the API.

Why it matters
Without the mapping, clients can’t merge chats or show a complete conversation, and they need direct DB access (which is fragile and undermines portability).

Proposed solution
Expose LID mapping via API, for example:

Option A – extend /user/contacts
Add fields like:

  • Lid / LID / lid (raw LID value)
  • LidJID (e.g. 204766877589603@lid)
  • Phone / pn (if available)

Option B – new endpoint
GET /user/lid-map returning { lid: "204766877589603", pn: "34602335608" } pairs.

Result
Clients can merge @lid and phone JIDs without touching the DB and present a single conversation per customer.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions