Skip to content

fix(contacts): import_contacts used a class that does not exist - #339

Merged
chigwell merged 1 commit into
chigwell:mainfrom
axisrow:fix/import-contacts
Oct 20, 2026
Merged

chigwell merged 1 commit into
chigwell:mainfrom
axisrow:fix/import-contacts

Conversation

@axisrow

@axisrow axisrow commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

import_contacts referenced functions.contacts.InputPhoneContact, which does not exist in Telethon — every call failed with AttributeError before reaching the API. The correct class is types.InputPhoneContact (telethon.tl.types).

While touching it, the input is validated up front (every contact needs phone and first_name) so the tool refuses a malformed list with a readable message instead of failing mid-import, and a missing last_name maps to "" instead of None.

Testing

  • tests/test_import_contacts.py covers the class resolution and the malformed-input refusal.
  • Full suite: 1411 passed.

🤖 Generated with Claude Code

functions.contacts.InputPhoneContact does not exist (the type lives in telethon.types), so every call raised AttributeError and nothing was sent to Telegram. Use types.InputPhoneContact and explain a malformed contact instead of failing on a KeyError.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Xun6C4mXUAKbVSmiEEh79
@chigwell
chigwell merged commit 0c938cb into chigwell:main Oct 20, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants