`duskbot pair --phone` on a self-hosted server makes a sign-in code, not a phone pairing, so the phone app never gets push

Đang mở
#352 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
authentication, cli, mobile

Hướng nghiên cứu

Start in pair-cli and trace how --phone, --public-url, and phoneAppPairing determine the pairing flow. Compare that path with the working POST /api/mobile/pairing endpoint and its duskbot://pair?m= link. Done means pair --phone with a public HTTPS URL creates a phone pairing that can receive pushes, or clearly explains when the printed code cannot.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Server 0.2.30, own systemd unit, public URL through a Cloudflare tunnel, no link service (duskbot vps status: link: not-installed).

Steps: duskbot pair --label iPhone --phone ios --public-url https://dusk.example, then paste the "phone app:" link into the app and allow notifications.

Expected: a paired phone that gets pushes.

Actual: a plain sign-in. No mobile-devices.json entry is made, and the app's PUT /api/mobile/push gets "this session is not a paired phone", so no push is ever sent. Neither the CLI nor the app says so.

Cause in pair-cli: options.client || options.publicUrl ? null : phoneAppPairing(...) skips phone pairing whenever --public-url is set. Without it, phoneAppPairing still returns null unless the link service gives a relay route. --phone only changes the printed text, and the "phone app:" link is the old sign-in invite.

What works: POST /api/mobile/pairing over the public HTTPS address gives a working duskbot://pair?m= link. iPhone (APNs) and Android (FCM) pushes then arrive through link.dusk.bot.

Ask: pair --phone should use /api/mobile/pairing when the server has a public HTTPS address, or at least say that the code it prints can't receive push.

Ngôn ngữ chính
TypeScript
Star
277
Fork
27
Merge trung bình
15 giờ 30 phút
Pull request đã merge (30 ngày)
147

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DuskBotAI/duskbot

Tất cả issue của DuskBotAI/duskbot

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.