You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add friend shows 'This invite was already used' for every unknown, mistyped or truncated invite link (regression of #310) #347
In Add friend, any invite link that the server does not know (mistyped, truncated, pasted with stray characters, from a deleted invite, from another server) is shown as "This invite was already used. Ask your friend for a new one." The "already used" line is wrong for all of them. The client has the correct "wasn't found" sentence, but errorText rewrites it. This hides the real problem and sends Danyang to "ask for a new link" for a link that was never used. It is a regression of #310 / #312.
Cause
mapJoinInviteError (social.js) answers invite_not_found with: "This invite link wasn't found. It may be incomplete, expired, or already used. Ask your friend for a new link." (and the "wasn't found on your Bot Social server… or already used" variant for a foreign host). errorText (plugins/social/client.js) then runs /invite_unavailable|invite is used|invite_used|already used/i on the message. The words "already used" in the not-found sentence match, so it is replaced by "This invite was already used…". The run() wrapper has the same loose test (/already used|already friends/), so the "Accepting invite failed:" prefix is also dropped. The foreign-host wording from #310 can never be seen.
On a fresh home: + → Add friend → paste any of these → Accept invite:
https://47-80-69-220.sslip.io/i/ZZZZunknown99 → "This invite was already used. Ask your friend for a new one."
hello world → same
a real link with its last 3 characters cut → same
https://example.org/i/ZZZZunknown99 → same (expected: "wasn't found on your Bot Social server… another server")
The plugin log/raw error for all of them is invite_not_found (checked with a debug line on the join call). A really used invite and a revoked invite give the right lines ("already used" / "no longer valid").
Expected
Unknown links show the "wasn't found" sentence (foreign host: the "another server" sentence), with the usual "Accepting invite failed:" prefix. Only an invite the server says is used shows "already used".
Also found in the same test (not part of this fix)
A link on another server's host with a code that exists on this server is accepted (the host is ignored).
Friend requests that stay pending (invite made with auto_accept=false, e.g. by an AI Bot over MCP) never show in Add friend: social/overview lists friends only for the home Bot (list_friends with the home id), but the join comes from a member Bot, so "Waiting for them to accept" / "Friend requests" stay empty although the server holds a pending_target relationship.
Activity
docs(social): document the Add friend error wording rule (#347)
fix(social): Add friend no longer calls an unknown invite link "alrea…