toMessage method

  1. @override
String toMessage()
override

Implementation

@override
String toMessage() {
  switch (code) {
    case PostChatMessageErrorCode.blocked:
      return 'err_blocked'.l10n;
    case PostChatMessageErrorCode.noTextAndNoAttachment:
      return 'err_no_text_and_no_attachment'.l10n;
    case PostChatMessageErrorCode.wrongAttachmentsCount:
      return 'err_wrong_attachments_items_count'.l10n;
    case PostChatMessageErrorCode.wrongReplyingChatItemsCount:
      return 'err_wrong_replying_item_count'.l10n;
    case PostChatMessageErrorCode.unknownAttachment:
      return 'err_unknown_attachment'.l10n;
    case PostChatMessageErrorCode.unknownReplyingChatItem:
      return 'err_unknown_replying_chat_item'.l10n;
    case PostChatMessageErrorCode.unknownChat:
      return 'err_unknown_chat'.l10n;
    case PostChatMessageErrorCode.unknownUser:
      return 'err_unknown_user'.l10n;
    case PostChatMessageErrorCode.artemisUnknown:
      return 'err_unknown'.l10n;
  }
}