Skip to content

Commit

Permalink
direct messages only use secure key if both the local node and the re…
Browse files Browse the repository at this point in the history
…mote node have public keys
  • Loading branch information
liamcottle committed Jan 4, 2025
1 parent f8ef384 commit af2e146
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/pages/NodeFilesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</template>
<template v-slot:trailing>
<div v-if="node" class="my-auto mr-1">
<div v-if="hasPublicKey(node.num)" @click="onPublicKeyInfoClick">
<div v-if="hasPublicKey(GlobalState.myNodeId) && hasPublicKey(node.num)" @click="onPublicKeyInfoClick">
<div class="cursor-pointer flex space-x-1 bg-green-50 rounded-md px-2 py-1 text-xs text-green-700 border border-green-700 font-medium">
<div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-4">
Expand Down
5 changes: 4 additions & 1 deletion src/components/pages/NodeMessagesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</template>
<template v-slot:trailing>
<div v-if="node" class="my-auto mr-1">
<div v-if="hasPublicKey(node.num)" @click="onPublicKeyInfoClick">
<div v-if="hasPublicKey(GlobalState.myNodeId) && hasPublicKey(node.num)" @click="onPublicKeyInfoClick">
<div class="cursor-pointer flex space-x-1 bg-green-50 rounded-md px-2 py-1 text-xs text-green-700 border border-green-700 font-medium">
<div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-4">
Expand Down Expand Up @@ -111,6 +111,9 @@ export default {
},
},
computed: {
GlobalState() {
return GlobalState;
},
node() {
return GlobalState.nodesById[this.nodeId];
},
Expand Down

0 comments on commit af2e146

Please sign in to comment.