Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/506-invite-copy-leftovers.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Host and zh copy that still said **Bot settings → Invite to this Bot** after #499/#504 now point at **Bot settings → Sharing → Copy invite link**.
4 changes: 2 additions & 2 deletions core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var ZH = {
"Invite link for {name} copied. Send it to your friend; once they accept, create the group again.": "{name} 的邀请链接已复制。发给好友,对方接受后再重新建群。",
"Invite link": "邀请链接",
"Could not copy the invite link for {name}. Copy the link below and send it to your friend; once they accept, create the group again.": "无法自动复制 {name} 的邀请链接。请手动复制下面的链接发给好友,对方接受后再重新建群。",
"Could not create the invite. Use Bot settings → Invite to this Bot.": "无法创建邀请。请在 Bot 设置里使用 Invite to this Bot。",
"Could not create the invite. Use Bot settings → Sharing → Copy invite link for this Bot.": "无法创建邀请。请在 Bot 设置 → Sharing 里使用 Copy invite link for this Bot。",
"Add friend": "添加好友",
"Friend requests": "好友请求",
"Accept or decline incoming requests.": "接受或拒绝收到的请求。",
Expand Down Expand Up @@ -11484,7 +11484,7 @@ function NewChat({ mode, roster, actions }) {
if (!link) throw new Error("no link");
} catch {
setInviteLink("");
setFixNote(t("Could not create the invite. Use Bot settings → Invite to this Bot."));
setFixNote(t("Could not create the invite. Use Bot settings → Sharing → Copy invite link for this Bot."));
return;
}
if (await copiedToClipboard(link)) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/client/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const ZH = {
'Invite link for {name} copied. Send it to your friend; once they accept, create the group again.': '{name} 的邀请链接已复制。发给好友,对方接受后再重新建群。',
'Invite link': '邀请链接',
'Could not copy the invite link for {name}. Copy the link below and send it to your friend; once they accept, create the group again.': '无法自动复制 {name} 的邀请链接。请手动复制下面的链接发给好友,对方接受后再重新建群。',
'Could not create the invite. Use Bot settings → Invite to this Bot.': '无法创建邀请。请在 Bot 设置里使用 Invite to this Bot。',
'Could not create the invite. Use Bot settings → Sharing → Copy invite link for this Bot.': '无法创建邀请。请在 Bot 设置 → Sharing 里使用 Copy invite link for this Bot。',
'Add friend': '添加好友',
'Friend requests': '好友请求',
'Accept or decline incoming requests.': '接受或拒绝收到的请求。',
Expand Down
2 changes: 1 addition & 1 deletion core/src/client/new-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function NewChat({ mode, roster, actions }) {
if (!link) throw new Error('no link')
} catch {
setInviteLink('')
setFixNote(t('Could not create the invite. Use Bot settings → Invite to this Bot.'))
setFixNote(t('Could not create the invite. Use Bot settings → Sharing → Copy invite link for this Bot.'))
return
}
if (await copiedToClipboard(link)) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/host/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ export function install(rt) {
list: () => team().map(view),
find: name => view(rt.findBot?.(name)),
isRemote,
// Whether this Bot has at least one person-grant (Invite to this Bot was accepted).
// Whether this Bot has at least one person-grant (Sharing → Copy invite link was accepted).
hasGrant: (id, peer, roomId) => rt.hasGrant?.(id, peer, roomId) === true,
hasAnyGrant: id => rt.hasAnyGrant?.(id) === true,
of: sessionId => view(rt.botOf(rt.selfOf(sessionId))),
Expand Down
2 changes: 1 addition & 1 deletion core/src/host/reach.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// There is no global "published" flag. Every access is an independent per-Bot GRANT
// (one of my Bots → one grantee; optionally scoped to a group). Default deny, Chief
// included. A grant is created when someone accepts "Invite to this Bot", or implicitly
// included. A grant is created when someone accepts a Sharing → Copy invite link, or implicitly
// when the owner brings their own Bot into a face-to-face room by its 6-digit number
// (`viaCode: true`, this room only, while a member).
//
Expand Down
2 changes: 1 addition & 1 deletion core/src/host/room-membership.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export function install(rt) {
const names = localBots.map(bot => bot.name).join(', ')
const friends = [...new Set(remotes.map(p => p.owner || p.name))].join(', ') || 'a friend'
const many = localBots.length > 1
const message = `${names} ${many ? 'are' : 'is'} not shared with ${friends}, so ${many ? 'they' : 'it'} cannot be in a group with their Bot: the group's messages go to ${friends}'s home. Share ${many ? 'them' : 'it'} with ${friends} (Bot settings → Invite to this Bot), or leave ${many ? 'them' : 'it'} out.`
const message = `${names} ${many ? 'are' : 'is'} not shared with ${friends}, so ${many ? 'they' : 'it'} cannot be in a group with their Bot: the group's messages go to ${friends}'s home. Share ${many ? 'them' : 'it'} with ${friends} (Bot settings → Sharing → Copy invite link for ${names}), or leave ${many ? 'them' : 'it'} out.`
return Object.assign(forbidden(message), { details: { reason: 'ungranted-local', bots: localBots, remotes } })
}

Expand Down
2 changes: 1 addition & 1 deletion core/test/remote-room.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ test('an ungranted local Bot refused next to a friend\'s Bot: the error names it
await assert.rejects(async () => rt.applyParticipants({ id: 'new', members: [], participants: [], createdAt: 1 }, drafts, actorA), (error) => {
assert.equal(error.code, 'bot/forbidden')
assert.match(error.message, /^Writer A is not shared with Bob, so it cannot be in a group with their Bot/)
assert.match(error.message, /Invite to this Bot/)
assert.match(error.message, /Sharing → Copy invite link for Writer A/)
assert.match(error.message, /leave it out/)
assert.deepEqual(error.details, {
reason: 'ungranted-local',
Expand Down
2 changes: 1 addition & 1 deletion core/types/flybot.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface BotView {
name: string
role?: string
isMain: boolean
/** True when this Bot has at least one person-grant (Invite to this Bot was accepted). */
/** True when this Bot has at least one person-grant (Sharing → Copy invite link was accepted). */
granted: boolean
createdBy: BotId | null
/** Text prompt.js appends to this Bot's system prompt (bot.setSystemPrompt). */
Expand Down
Loading
Loading