toApiJson static method

Map<String, dynamic> toApiJson(
  1. RemoteActivityData msg
)

Implementation

static Map<String, dynamic> toApiJson(RemoteActivityData msg) {
  return {
    "id": msg.id,
    "message": msg.message,
    "timestamp": msg.timestamp,
    "from": _resolveFrom(msg),
    "isReplied": msg.replyMessage != null,
    "replyMessage": msg.replyMessage?.toJson(),
    "reactions": msg.reactions?.map((e) => e.toJson()).toList() ?? [],
  };
}