fromProto static method

Thread fromProto(
  1. Message messageProto
)

Implementation

static Thread fromProto(protomsg.Message messageProto) {
  return Thread(
    uid: messageProto.thread.uid,
    topic: messageProto.thread.topic,
    content: messageProto.content,
    type: messageProto.thread.type,
    status: messageProto.thread.status,
    unreadCount: 1,
    //
    client: messageProto.client,
    extra: messageProto.thread.extra,
    //
    user: UserProtobuf.fromThreadProto(messageProto),
    updatedAt: messageProto.createdAt,
  );
}