mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-16 15:30:15 +00:00
When a scanner is shown a QR code of a different kind than it expects, it now tells the user what they actually scanned and where to use it, instead of a generic "invalid" message. Link recognition is done in the core: a new chat_check_link export classifies a scanned string using the same decoders the views use to process the links (connection link, server address, migration file link, desktop address, security code), returning a typed result. Each scanner calls checkLink first; the expected type proceeds to that scanner's normal success path, a recognised-but-wrong type shows a shared wrong-type alert saying what it is and where to use it, and an unrecognised string falls back to that scanner's own contextual error. Mirrored on Android, desktop and iOS. Note: the iOS Swift was written without an Xcode toolchain and is not yet compiled — needs a Mac/CI build to verify.
27 lines
566 B
Modula-2
27 lines
566 B
Modula-2
LIBRARY libsimplex
|
|
EXPORTS
|
|
hs_init
|
|
hs_init_with_rtsopts
|
|
chat_migrate_init
|
|
chat_close_store
|
|
chat_send_cmd
|
|
chat_send_cmd_retry
|
|
chat_send_remote_cmd
|
|
chat_send_remote_cmd_retry
|
|
chat_recv_msg
|
|
chat_recv_msg_wait
|
|
chat_parse_markdown
|
|
chat_parse_server
|
|
chat_check_link
|
|
chat_parse_uri
|
|
chat_password_hash
|
|
chat_valid_name
|
|
chat_json_length
|
|
chat_badge_keygen
|
|
chat_badge_issue
|
|
chat_encrypt_media
|
|
chat_decrypt_media
|
|
chat_write_file
|
|
chat_read_file
|
|
chat_encrypt_file
|
|
chat_decrypt_file |