Skip to content

No context event is received when using liff.sendMessages() to send flex message - LINE integration #994

@Darrenlow83

Description

@Darrenlow83

Environment:
Language: NodeJS
Server: Node Express
Device: Huawei P20, iPhone 11

Description
When using liff.sendMessages() to send flex message on behalf of a user, the app context event is not being obtained

To Reproduce

  1. Open liff app
  2. Call liff.sendMessages() to send a flex message on behalf of user. For instance:
liff.sendMessages([
  {
    "type": "flex",
    "altText": "Game mode",
    "contents": {
      "type": "bubble",
      "body": {
        "type": "box",
        "layout": "vertical",
        "contents": [
          {
            "type": "text",
            "text": "Player 1 selected",
            "weight": "regular",
            "size": "md",
            "align": "center"
          },
          {
            "type": "text",
            "text": "C01",
            "weight": "bold",
            "size": "3xl",
            "align": "center",
            "offsetTop": "xxl"
          }
        ],
        "height": "130px"
      }
    }
  }        
]);
  1. Print context at the backend

Expected behavior
App context event should be captured when sending flex message via liff.sendMessages(). According to the LINE docs, webhook events contain the contentProvider.type property = external parameter when image message (flex) is sent using the liff.sendMessages() method, but it seems like this event is not being handled in the codes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions