Skip to content

Add friend: a pasted invite without https:// or /i/ fails with raw 'invite_not_found' #310

Closed

Description

@Birfy

What happens

Sidebar + → Add friend: pasting 47-80-69-220.sslip.io/eWDDdBMIxLSZ (no https://, and the /i/ part missing; the real link is https://47-80-69-220.sslip.io/i/eWDDdBMIxLSZ) and clicking Accept invite shows the raw error:

Accepting invite failed: Bot Social join_invite: invite_not_found

Why

social/join-invite only strips a leading …/i/. Without /i/ the whole pasted text is sent to Bot Social's join_invite, which looks it up as the invite code (Bot Social itself only strips ^.*/i/), so it is never found. Then the error code reaches the UI as written; only relationship_exists and "used" were turned into sentences.

Expected

  • The box takes a full link, a link without the scheme, a link whose /i/ is missing (host plus one bare token), a bare code, and the whole copied invite text.
  • A pasted host that is not the configured server is never added to a bare code; the link is still tried, and the not-found message says it may come from another server.
  • invite_not_found (and expired / revoked / own invite / blocked / rate limited) read as one short plain sentence, e.g. "This invite link wasn't found. It may be incomplete, expired, or already used. Ask your friend for a new link."
  • No new buttons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions