Dolfik1/Funogram

ApiResponseException: Internal error: Cannot match type "Funogram.Telegram.Types+ChatMember" by fields

techiedesu opened this issue · 1 comments

ApiResponseException: Internal error: Cannot match type "Funogram.Telegram.Types+ChatMember" by fields. Please create issue on https://github.com/Dolfik1/Funogram/issues in

{
  "ok": true,
  "result": [
    {
      "update_id": 30424532,
      "my_chat_member": {
        "chat": {
          "id": -9999999999999,
          "title": "redacted",
          "type": "supergroup"
        },
        "from": {
          "id": 999999999,
          "is_bot": true,
          "first_name": "redacted",
          "username": "redactedBot"
        },
        "date": 1700911047,
        "old_chat_member": {
          "user": {
            "id": 9999999999,
            "is_bot": true,
            "first_name": "redacted",
            "username": "redactedBot"
          },
          "status": "member"
        },
        "new_chat_member": {
          "user": {
            "id": 9999999999,
            "is_bot": true,
            "first_name": "redacted",
            "username": "redacted"
          },
          "status": "restricted",
          "until_date": 1700914646,
          "can_send_messages": false,
          "can_send_media_messages": false,
          "can_send_audios": false,
          "can_send_documents": false,
          "can_send_photos": false,
          "can_send_videos": false,
          "can_send_video_notes": false,
          "can_send_voice_notes": false,
          "can_send_polls": false,
          "can_send_other_messages": false,
          "can_add_web_page_previews": false,
          "can_change_info": false,
          "can_invite_users": false,
          "can_pin_messages": false,
          "can_manage_topics": false,
          "is_member": true
        }
      }
    }
  ]
}

. Code: -1

Thank you for report!

The list of fields in new_chat_member doesn't match the list of fields provided by Bot's API documentation. The can_send_media_messages field is not mentioned in documentation.

I've added workaround in #65. Please, update your Funogram version to 2.0.8