feat(ui-flow): preview-join-invite and create-guild templateId (Phase 663)
Route join invite preview IPC and pass templateId through create-guild. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -65,7 +65,8 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
if (t === 'create-guild') {
|
||||
await platform.createGuild({
|
||||
name: msg.name || 'My Server',
|
||||
publicListing: msg.publicListing !== false
|
||||
publicListing: msg.publicListing !== false,
|
||||
templateId: msg.templateId || null
|
||||
})
|
||||
pushState()
|
||||
if (platform.activeChannelId && platform.mode === 'guild') {
|
||||
@@ -995,6 +996,11 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
return true
|
||||
}
|
||||
if (t === 'preview-join-invite') {
|
||||
const out = await platform.previewJoinInvite(msg.code)
|
||||
send({ type: 'join-invite-preview', result: out })
|
||||
return true
|
||||
}
|
||||
if (t === 'update-staged-attachment-meta') {
|
||||
await platform.updateStagedAttachmentMeta(msg.attachmentId, {
|
||||
caption: msg.caption,
|
||||
|
||||
Reference in New Issue
Block a user