Skip to content

Commit 997ffaa

Browse files
author
nullagent
committed
short code create working on match maker client
1 parent 26c8d72 commit 997ffaa

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/party/peer/match-maker-client.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,12 @@ annoucement: {
412412
return inviteStateResult.invite
413413
}
414414

415-
async createShortCode(uses=3, expiry){
416-
debug('setInviteState')
417-
let actor = this.identity.key.hash
415+
async createShortCode(use_limit=3, expiry){
416+
debug('createShortCode')
418417

419418
const request = {
420-
invite: invite.inviteDoc.$meta.id,
421-
actor,
422-
state: newState
419+
use_limit,
420+
expiry: !expiry ? Date.now()+24*60*60*3 : expiry
423421
}
424422

425423
const result = await this.restParty.comms.call('short-code/create', request, {
@@ -428,13 +426,13 @@ annoucement: {
428426
useSessions: true
429427
})
430428

431-
console.log('setInviteState result', result)
429+
console.log('createShortCode result', result)
432430

433431
if(!result.done){
434432
return null
435433
}
436434

437-
return result.invite
435+
return result.short_code
438436
}
439437

440438
async lookupPublicKeyByShortCode( code ){

0 commit comments

Comments
 (0)