sender_id_from_int static method

Map sender_id_from_int(
  1. int data_id
)

Implementation

static Map sender_id_from_int(int data_id) {
  if (data_id > 0) {
    return {
      "@type": "messageSenderUser",
      "user_id": data_id,
    };
  } else {
    return {
      "@type": "messageSenderChat",
      "chat_id": data_id,
    };
  }
}