Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
techiedesu opened this issue Nov 26, 2023 · 1 comment

Comments

@techiedesu
Copy link
Contributor

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

Dolfik1 added a commit that referenced this issue Nov 27, 2023
Dolfik1 added a commit that referenced this issue Nov 27, 2023
* Fix TestBot

* Fix issue #64

* Bump version
@Dolfik1
Copy link
Owner

Dolfik1 commented Nov 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants