Skip to content

fix(client): isEdited missed edits fetched from the message box - #228

Merged
EdamAme-x merged 1 commit into
evex-dev:mainfrom
kyo5uke:fix/is-edited-updated-time
Sep 6, 2026
Merged

fix(client): isEdited missed edits fetched from the message box#228
EdamAme-x merged 1 commit into
evex-dev:mainfrom
kyo5uke:fix/is-edited-updated-time

Conversation

@kyo5uke

@kyo5uke kyo5uke commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

TalkMessage.isEdited returns false for edited messages fetched from the
message box, while TalkMessage.updatedTime returns the edit time for the same
message. The two getters contradict each other.

isEdited (added in #225) only looked at contentMetadata.EDITED and the
updatedTime field. But a message returned by getRecentMessagesV2 carries
neither — only contentMetadata.UPDATED_TIME:

id: 630153925194416265
updatedTime (field 28) : absent
contentMetadata.EDITED : absent
contentMetadata.UPDATED_TIME : 1788432321630

updatedTime already reads UPDATED_TIME first, so it reports the edit
correctly; isEdited does not. Any chat history walked with
getRecentMessagesV2 / getPreviousMessagesV2 reports every edited message as
unedited.

isEdited now defers to updatedTime instead of repeating a narrower lookup,
so the two cannot drift apart again.

This also corrects a comment I got wrong in #225: it claimed updatedTime is
"only set on messages fetched from the message box". The message box does not
set that field at all.

Testing

  • New regression test using the payload shape captured from a live
    getRecentMessagesV2 response. It fails before this change and passes after.
  • deno test -A → 241 passed
  • deno publish --dry-run → passes

Observed against my own account: a message edited from the LINE iOS app, then
re-fetched with getRecentMessagesV2.

Checklist

  • Run tests
  • Add jsdoc
  • Test in your environment

Messages returned by getRecentMessagesV2 mark an edit only with
contentMetadata.UPDATED_TIME - no EDITED flag and no updatedTime field - so
isEdited reported them as unedited while updatedTime returned the edit time.

isEdited now defers to updatedTime instead of repeating a narrower lookup.
@EdamAme-x
EdamAme-x merged commit b340991 into evex-dev:main Sep 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants