Skip to content

Commit c478cb1

Browse files
committed
refactor conversation name to display name
1 parent 946fb17 commit c478cb1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

meshchat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ async def index(request):
10981098

10991099
# add to conversations
11001100
conversations.append({
1101-
"name": self.get_lxmf_conversation_name(other_user_hash),
1101+
"display_name": self.get_lxmf_conversation_name(other_user_hash),
11021102
"destination_hash": other_user_hash,
11031103
"is_unread": self.is_lxmf_conversation_unread(other_user_hash),
11041104
"failed_messages_count": self.lxmf_conversation_failed_messages_count(other_user_hash),

src/frontend/components/messages/MessagesPage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default {
101101
102102
// we didn't find an existing peer, so just use an unknown name
103103
this.onPeerClick({
104-
name: "Unknown Peer",
104+
display_name: "Unknown Peer",
105105
destination_hash: destinationHash,
106106
});
107107

src/frontend/components/messages/MessagesSidebar.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</div>
3030
</div>
3131
<div class="mr-auto">
32-
<div class="text-gray-900" :class="{ 'font-semibold': conversation.is_unread || conversation.failed_messages_count > 0 }">{{ conversation.name }}</div>
32+
<div class="text-gray-900" :class="{ 'font-semibold': conversation.is_unread || conversation.failed_messages_count > 0 }">{{ conversation.display_name }}</div>
3333
<div class="text-gray-500 text-sm">{{ formatTimeAgo(conversation.updated_at) }}</div>
3434
</div>
3535
<div v-if="conversation.is_unread" class="my-auto ml-2 mr-2">
@@ -160,9 +160,9 @@ export default {
160160
searchedConversations() {
161161
return this.conversations.filter((conversation) => {
162162
const search = this.conversationsSearchTerm.toLowerCase();
163-
const matchesName = conversation.name.toLowerCase().includes(search);
163+
const matchesDisplayName = conversation.display_name.toLowerCase().includes(search);
164164
const matchesDestinationHash = conversation.destination_hash.toLowerCase().includes(search);
165-
return matchesName || matchesDestinationHash;
165+
return matchesDisplayName || matchesDestinationHash;
166166
});
167167
},
168168
peersCount() {

0 commit comments

Comments
 (0)