feat: keep track of new messages
This commit is contained in:
parent
098cb5adf5
commit
e04b9dc448
7 changed files with 32 additions and 1 deletions
|
|
@ -20,6 +20,16 @@ async function directMessages(path) {
|
|||
},
|
||||
methods: {
|
||||
sendMessage: async function () {},
|
||||
buildCustomerLabel: function (c) {
|
||||
let label = `${c.profile.name || 'unknown'} ${c.profile.about || ''}`
|
||||
if (c.unread_messages) {
|
||||
label += `[new: ${c.unread_messages}]`
|
||||
}
|
||||
label += ` (${c.public_key.slice(0, 16)}...${c.public_key.slice(
|
||||
c.public_key.length - 16
|
||||
)}`
|
||||
return label
|
||||
},
|
||||
getDirectMessages: async function (pubkey) {
|
||||
if (!pubkey) {
|
||||
this.messages = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue