Skip to content

Commit

Permalink
fix: meta message for accept promo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arn4b committed Aug 10, 2023
1 parent f6267d0 commit 906169b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/restapi/src/lib/space/acceptPromotionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ export async function acceptPromotionRequest(

const updatedLiveSpaceData = produce(oldLiveSpaceData, (draft) => {
const listnerIndex = draft.listeners.findIndex((listner) => listner.address === pCAIP10ToWallet(promoteeAddress));
if (listnerIndex > -1) draft.listeners[listnerIndex].handRaised = false;

draft.listeners.splice(listnerIndex, 1);
if (listnerIndex > -1) draft.listeners[listnerIndex].handRaised = false;

const promotedListener: AdminPeer = {
address: draft.listeners[listnerIndex].address,
emojiReactions: draft.listeners[listnerIndex].emojiReactions,
audio: true,
}

draft.listeners.splice(listnerIndex, 1);

draft.speakers.push(promotedListener);
});

Expand All @@ -67,7 +67,7 @@ export async function acceptPromotionRequest(
env: this.env,
spaceId: this.spaceSpecificData.spaceId,
signer: this.signer,
action: META_ACTION.USER_INTERACTION,
action: META_ACTION.PROMOTE_TO_SPEAKER,
});

// accept the promotion request
Expand Down

0 comments on commit 906169b

Please sign in to comment.