You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If event received is kind 42, and if it's event_id or pubkey don't present in muted and hided then store it in atom channelMessages. After that, ChannelMessages component get message from atom sortedChannelMessages which is sorted message base on created_at
if (muted.current.has(event.pubkey)) {
console.log('muted');
} else if (hided.current.has(event.id)) {
console.log('hided');
} else {
setChannelMessages((messages) => [event, ...messages]);
}
Kind 41
In useChannelMetadata hook, Lume will load metadata from kind 40 first, if kind 41 present for this event_id then update and re-render
Known problems
Currently, Lume is only load event since 24 hours, many channel have spam issue, if load all events from begining, it will hurt performance
Create channel is work fine, but it need to improve UI/UX
Roadmap
Implement infinite loading, when user scroll up, load more event instead load all event at once
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How Lume handle NIP-28?
Channel List
Lume provide 2 default channels, which are:
Event
Lume create 2 Set() objects to store muted user
pubkey
and hide messageevent_id
Lume fetch event with filter
kind: [42, 43 ,44]
when user click to channelKind 43
If event received is kind 43, store event_id in
hided
Kind 44
If event received is kind 44, store
pubkey
inmuted
Kind 42
If event received is kind 42, and if it's
event_id
orpubkey
don't present inmuted
andhided
then store it in atomchannelMessages
. After that,ChannelMessages
component get message from atomsortedChannelMessages
which is sorted message base oncreated_at
Kind 41
In
useChannelMetadata
hook, Lume will load metadata fromkind 40
first, ifkind 41
present for thisevent_id
then update and re-renderKnown problems
Roadmap
Beta Was this translation helpful? Give feedback.
All reactions