Closed qazmlp closed 3 weeks ago
Good point! Definitely the right idea. Maybe we could bridge DMs eventually, but not any time soon.
On a related note, I wish the fediverse had this kind of explicit DM awareness! Sadly DMs there are entirely a hack, as is usual with many fediverse features. 😢
On a related note, I wish the fediverse had this kind of explicit DM awareness! Sadly DMs there are entirely a hack, as is usual with many fediverse features. 😢
I would think they'll make them more of an official part of AP while they work on this encryption standard https://wedistribute.org/2024/05/encrypted-dms-activitypub/
OK, we're now doing this for new users going forward, and I'm running this to backfill existing users:
from arroba.repo import Repo, Write
from arroba.storage import Action
from arroba.util import TombstonedRepo
chat_declaration = {
"$type" : "chat.bsky.actor.declaration",
"allowIncoming" : "none",
}
aps = ActivityPub.query(ActivityPub.enabled_protocols == 'atproto',
ActivityPub.status == None).fetch()
for i, user in enumerate(aps):
did = user.get_copy(ATProto)
print(i, did, user.key.id())
try:
repo = arroba.server.storage.load_repo(did)
except TombstonedRepo:
continue
repo.apply_writes([Write(
action=Action.CREATE, collection='chat.bsky.actor.declaration',
rkey='self', record=chat_declaration)])
I'm seeing the speech bubble button on my bridged profile:![@Qazm.tiggi.es.ap.brid.gy follows me and shows the DM button.](https://github.com/snarfed/bridgy-fed/assets/17500283/19b441de-a372-4005-983b-716ce4d23c14)
I can also send a DM without getting an error:![Me sending "Hey!" to myself on Bluesky.](https://github.com/snarfed/bridgy-fed/assets/17500283/20a5f83b-dadf-42c9-9090-b4331e0ea070)
This is most like due to Bluesky defaulting it to open-to-followers also for other PDSs. Since Bridgy doesn't actually support DMs, I'd like the account to show that its DMs are closed.