im: card table cells drop at mentions and local_datetime (markdown cell data)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start in shortcuts/im/convert_lib/card.go at convertTable and extractTableCellValue, then compare how body elements are handled by convertElement. Reproduce with the supplied card data and check that markdown table cells preserve mentions and local datetimes as they do outside tables; also confirm existing table conversion still works.
Written by the indexing model from the issue text.
Description
Summary
When an interactive card (schema 2.0) contains a table whose columns have dataType: "markdown", the converter in shortcuts/im/convert_lib/card.go drops every at and local_datetime element inside the cells. Each cell keeps only its plain_text pieces, so a schedule table comes out as | – | , |: the times and the people are gone.
The same elements outside a table convert correctly.
Seen on v1.0.100, and main has the same code. Affects im +messages-mget, +chat-messages-list, +threads-messages-list, and everything else that renders cards through convertCard with card_msg_content_type=raw_card_content.
Reproduction
Raw content as mget returns it with card_msg_content_type=raw_card_content (synthetic data):
{"card_schema":2,"json_attachment":"{\"at_users\":{\"u1\":{\"content\":\"Alice\",\"mention_key\":\"@_user_1\"},\"u2\":{\"content\":\"Bob\",\"mention_key\":\"@_user_2\"}}}","json_card":"{\"body\":{\"property\":{\"elements\":[{\"property\":{\"elements\":[{\"property\":{\"content\":\"Outside a table: \"},\"tag\":\"plain_text\"},{\"property\":{\"userID\":\"u1\"},\"tag\":\"at\"},{\"property\":{\"content\":\" at \"},\"tag\":\"plain_text\"},{\"property\":{\"formatType\":\"date\",\"milliseconds\":\"1794441300000\"},\"tag\":\"local_datetime\"}]},\"tag\":\"markdown\"},{\"property\":{\"columns\":[{\"dataType\":\"markdown\",\"displayName\":\"Shift\",\"name\":\"shift\"},{\"dataType\":\"markdown\",\"displayName\":\"Primary\",\"name\":\"who\"}],\"rows\":[{\"shift\":{\"data\":{\"property\":{\"elements\":[{\"property\":{\"formatType\":\"date_short\",\"milliseconds\":\"1794412800000\"},\"tag\":\"local_datetime\"},{\"property\":{\"content\":\" \"},\"tag\":\"plain_text\"},{\"property\":{\"formatType\":\"time\",\"milliseconds\":\"1794412800000\"},\"tag\":\"local_datetime\"},{\"property\":{\"content\":\" – \"},\"tag\":\"plain_text\"},{\"property\":{\"formatType\":\"time\",\"milliseconds\":\"1794437940000\"},\"tag\":\"local_datetime\"}]},\"tag\":\"markdown\"}},\"who\":{\"data\":{\"property\":{\"elements\":[{\"property\":{\"userID\":\"u1\"},\"tag\":\"at\"},{\"property\":{\"content\":\", \"},\"tag\":\"plain_text\"},{\"property\":{\"userID\":\"u2\"},\"tag\":\"at\"}]},\"tag\":\"markdown\"}}}]},\"tag\":\"table\"}]}},\"schema\":2}"}
with mentions [{"key":"@_user_1","id":"ou_alice","name":"Alice"},{"key":"@_user_2","id":"ou_bob","name":"Bob"}].
convertCard(raw, mentions) returns:
<card>
Outside a table: @Alice(ou_alice) at 2026-11-11T23:55:00Z
| Shift | Primary |
|------|------|
| – | , |
</card>
Expected: the cells read the way the same elements read outside the table, e.g.
| 2026-11-11T00:00:00Z 2026-11-11T00:00:00Z – 2026-11-11T06:59:00Z | @Alice(ou_alice), @Bob(ou_bob) |
Where it goes wrong
convertTable → extractTableCellValue(cellData["data"]). For a markdown cell, data is a card element ({"tag":"markdown","property":{"elements":[…]}}), so it takes the default branch → extractTextContent → extractTextFromProperty. That joins only the content / text / i18nContent of each child, and at (userID) and local_datetime (milliseconds) have none of those.
A cell whose data is a tagged element could go through convertElement instead, as body elements do. Then convertAt (with at_users / mentions) and convertLocalDatetime apply inside tables too, along with links, emoji and text styles.
Context
This matters for messages from on-call and scheduling bots, which are often tables of <at> and <local_datetime>. For those cards the converted text keeps none of the information the card carries.
- Dominant language
- Go
- Stars
- 18.2k
- Forks
- 1.4k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from larksuite/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
bug domain/doc
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
mail: all-ASCII draft bodies are hard-wrapped every 998 bytes, inserting newlines inside words and tagsPossibly taken @linye157 claimed this 26 days ago. Opendomain/mail
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
auth: a 429 from the Token Endpoint during refresh deletes a still-valid loginPossibly taken @linye157 claimed this 26 days ago. Openbug domain/auth domain/im
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
larksuite/cli#2869 · 5 comments ·
Maintainers usually reply within 1 day
-
domain/core enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
github/github-mcp-server#3960 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
JuliusBrussee/caveman#1594 ·
Maintainers usually reply within 1 day
-
C-bug O-community X-blathers-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
cockroachdb/cockroach#176264 · 1 comment ·
-
security trivy
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
kubefleet-dev/kubefleet#1068 ·
Maintainers usually reply within 3 days