Skip to content

stickers: bridge LINE emoji packs and send them as sticons - #306

Merged
highesttt merged 3 commits into
mainfrom
highest/line-emoji-packs
Nov 3, 2026
Merged

highesttt merged 3 commits into
mainfrom
highest/line-emoji-packs

Conversation

@highesttt

Copy link
Copy Markdown
Collaborator

Lists owned LINE emoji (sticon) packs as emoji image packs, using each pack's meta.json for IDs and alt text. Picking one of those emoji in a message sends it to LINE as a sticon (REPLACE resource plus STICON_OWNERSHIP), in plain and encrypted chats. Emoji that can't be resolved fall back to their alt text.

@indent

indent Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Issues

All clear! No issues remaining. 🎉

2 issues already resolved
  • Every emoji send and pack listing re-downloads the pack's meta.json from the LINE CDN because the parsed sticker list isn't cached. A message with N emoji does N blocking fetches, and a slow CDN delays the send and drops emoji to alt text. (fixed by commit f2b1c3a)
    Found by Indent Review Agent
  • A failed or timed-out emoji-shop fetch caches a pack list with no emoji packs. ownedStickerProducts (pkg/connector/imagepack.go ~line 124) treats a sticonshop GetOwnedProducts error as non-fatal and still stores the sticker-only map in lc.stickerPacks. The cold-cache emoji send runs under a 5s timeout (send_message.go:237), so a deadline hit or transient failure leaves the cache without emoji packs, and resolveSticker (refreshOnMiss=false) never refreshes it. Every later LINE emoji then goes out as alt text until ListImagePacks refreshes or the client restarts. (fixed by commit 55d1e5d)
    Found by Indent Review Agent

CI Checks

All CI checks passed on 55d1e5d.

Review agents

Select any unchecked box below to run or rerun that agent.

Passed (1)
  • Indent Review Agent · Fixed; one nit on retries while emoji shop is down
Full results

Indent Review Agent

  • Summary: Fixed; one nit on retries while emoji shop is down
  • Last ran on commit: 55d1e5d8
  • Latest result
    {
      "summary": "Fixed; one nit on retries while emoji shop is down",
      "findings": [
        {
          "fix": "Rate-limit the partial retry. Record when the last partial fetch happened and only retry after a backoff of about a minute. Alternatively, refetch just the sticonshop list instead of the whole product set, or let the retry happen at most once per outgoing message, for example by remembering inside `outgoingSticons` that resolution already failed.",
          "line": 292,
          "path": "pkg/connector/imagepack.go",
          "issue": "The earlier finding is fixed. `stickerPacksPartial` is set when the sticonshop fetch fails, and a cache miss now triggers a refresh even with `refreshOnMiss=false`. Owning no emoji packs is not treated as partial, so in that case there's no retry loop. There is no backoff, though. While the sticonshop call keeps failing, every miss on a LINE-bridged emoji triggers a full `ownedStickerProducts` refresh: GetProfile, all stickershop pages, then sticonshop again. That happens once per distinct emoji mxc per message, since `outgoingSticons` caches only within one call. Each refresh runs under the 5s per-emoji timeout, so a message with N distinct LINE emoji can be held up to about 5·N seconds, and each attempt adds LINE API traffic. It recovers on its own once the shop answers.",
          "title": "No backoff on the partial-cache retry while the emoji shop keeps failing",
          "severity": "nit"
        }
      ]
    }

Comment thread pkg/connector/imagepack.go Resolved
@highesttt
highesttt force-pushed the highest/line-emoji-packs branch from f2b1c3a to 1c59e08 Compare November 3, 2026 06:08
@highesttt highesttt changed the title sticker: bridge LINE emoji packs and send them as sticons stickers: bridge LINE emoji packs and send them as sticons Nov 3, 2026
@highesttt
highesttt merged commit 9043390 into main Nov 3, 2026
9 checks passed
@highesttt
highesttt deleted the highest/line-emoji-packs branch November 3, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant