-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outbox read relays are not used for DMs #80
Comments
probably related to #92 |
@dtonon I have a question about this: NIP-17 states: "It's advisable that relays do not serve kind:1059 to clients other than the ones tagged in them. It's advisable that users choose relays that conform to these practices." I have read this as "only send to my own preferred dm relays and the receivers preferred dm relays". why would I want to have this on any public outbox relay? Most of those are not auth relays. |
You are right, sorry, I was thinking about kind:10050 events, not kid:10002 ones. |
I'll verify this, thanks
…On Thu, Feb 20, 2025, 18:14 daniele ***@***.***> wrote:
You are right, sorry, I was thinking about kind:10050 events, not
kid:10002 ones.
The problem is the same, it seems that Futr does not deliver to the
recipient DMs relays, but only to the sender preferred relays.
—
Reply to this email directly, view it on GitHub
<#80 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAJPA3MJE5AHKPH7WYFD32QZAUXAVCNFSM6AAAAABXLH4LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZSGY4TQMBZGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: dtonon]*dtonon* left a comment (futrnostr/futr#80)
<#80 (comment)>
You are right, sorry, I was thinking about kind:10050 events, not
kid:10002 ones.
The problem is the same, it seems that Futr does not deliver to the
recipient DMs relays, but only to the sender preferred relays.
—
Reply to this email directly, view it on GitHub
<#80 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAJPA3MJE5AHKPH7WYFD32QZAUXAVCNFSM6AAAAABXLH4LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZSGY4TQMBZGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Code wise: PublishGiftWrap event' senderPk recipientPk -> do
void $ putEvent $ EventWithRelays event' Set.empty
dmRelayList <- getDMRelays senderPk
recipientDMRelays <- getDMRelays recipientPk
if null dmRelayList || null recipientDMRelays
then pure ()
else do
let allRelayURIs = nub $ dmRelayList ++ recipientDMRelays
modify $ \st -> st
{ publishStatus = Map.insert
(eventId event')
(Map.fromList [(relay, Publishing) | relay <- allRelayURIs])
(publishStatus st)
}
existingConnections <- getConnectedRelays
let (existingRelays, newRelays) = partition
(`elem` existingConnections)
allRelayURIs
forM_ existingRelays $ \r -> writeToChannel event' r
forM_ newRelays $ \r -> async $ do
connected <- connect r
if connected
then do
writeToChannel event' r
disconnect r
else do
modify $ \st' -> st'
{ publishStatus = Map.adjust
(Map.insert r (Failure "Relay server unreachable"))
(eventId event')
(publishStatus st')
} I see it sending to all relays. I just added publish status UI for sent events, maybe this helps debugging what's going wrong. |
I sent a message to myself with a test account, and it's only delivered to the "preferred relay" I set up for this test account, it has not been delivered to my read relays.
Without some more info for the profile, I cannot check if the app is actually fetching my correct NIP-65 list.
The text was updated successfully, but these errors were encountered: