Skip to content
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

Draft: Initial ActivityPub / Mastodon Support #460

Open
wants to merge 273 commits into
base: master
Choose a base branch
from

Conversation

NuSkooler
Copy link
Owner

⚠️ THIS IS A WORK IN PROGRESS ⚠️

@y4my4my4m
Copy link

y4my4my4m commented Sep 6, 2023

@NuSkooler
This is awesome, I've just noticed this PR.
I will checkout and see if I can contribute. My BBS is related to my Misskey ( a mastodon compatible but separate activity pub software) so it seems fitting that you'd be able to use interchangeably!!

@NuSkooler
Copy link
Owner Author

@y4my4my4m A great initial help would be testing and finding where the implementation is quirky, and ensuring interoperability with Misskey would be awesome!

@y4my4my4m

This comment was marked as resolved.

@y4my4my4m

This comment was marked as resolved.

@NuSkooler
Copy link
Owner Author

@y4my4my4m Thank you for all the info thus far. I have had other obligations the last couple weeks, but hope to have some time to start working on AP again.

RE what enig's implementation is, yeah a full AP server. The intent is to allow @yourname@yourboard.com accounts. Board-to-board and Fediverse merged.

@y4my4my4m
Copy link

y4my4my4m commented Sep 9, 2023

@NuSkooler
Sorry for the confusion, I realized I had left the domain in my local hostsfiles and was actually connecting to a local instance 😅
I got it running properly now

Works:

  • following (local & remote)
  • followers (local & remote)
  • receiving DMs (local & remote)
  • sending DMs (local only)
  • replying to DMs (local & remote)
  • avatar display
  • public posts ONLY after you've received a public mention

Doesn't work

  • manual approve of follow request
    • remote: stuck at "processing..." instead of "awaiting request approval".
    • local: pressing "space" or "del" doesn't do anything [log1]
  • post public posts if never mentioned (cant open the page) [log2]
  • list public posts (no log output)

Logs

log1:

{"name":"ENiGMA½","hostname":"f2d3f90e2d99","pid":15,"nodeId":1,"sessionId":"BrUmN2BVVaK","username":"devtest","level":40,"method":"spaceKeyPressed","msg":"Object does not exist: Method does not exist","time":"2023-09-09T11:42:24.587Z","v":0}
{"name":"ENiGMA½","hostname":"f2d3f90e2d99","pid":15,"nodeId":1,"sessionId":"BrUmN2BVVaK","username":"devtest","level":40,"err":{"message":"Object does not exist: Method does not exist","name":"EnigError","stack":"EnigError: Object does not exist: Method does not exist\n    at Object.DoesNotExist (/workspaces/dev-bbs-XXXX/core/enig_error.js:34:9)\n    at Object.handleAction (/workspaces/dev-bbs-XXXX/core/menu_util.js:245:36)\n    at ViewController.handleActionWrapper (/workspaces/dev-bbs-XXXX/core/view_controller.js:52:18)\n    at ViewController.clientKeyPressHandler (/workspaces/dev-bbs-XXXX/core/view_controller.js:84:22)\n    at TelnetClient.emit (node:events:514:28)\n    at bufPart (/workspaces/dev-bbs-XXXX/core/client.js:445:26)\n    at Array.forEach (<anonymous>)\n    at TelnetClient.clientData (/workspaces/dev-bbs-XXXX/core/client.js:325:13)\n    at TelnetClient.emit (node:events:514:28)\n    at TelnetClient.<anonymous> (/workspaces/dev-bbs-XXXX/core/servers/login/telnet.js:40:18)","code":-33002},"msg":"Error during handleAction()","time":"2023-09-09T11:42:24.587Z"

log2:

{"name":"ENiGMA½","hostname":"f2d3f90e2d99","pid":15,"nodeId":1,"sessionId":"BrUmN2BVVaK","username":"devtest","level":50,"error":"No messages in area","msg":"Error loading message list","time":"2023-09-09T11:46:33.458Z","v":0}
{"name":"ENiGMA½","hostname":"f2d3f90e2d99","pid":15,"nodeId":1,"sessionId":"BrUmN2BVVaK","username":"devtest","level":40,"msg":"Error during init sequence { error: 'No messages in area' }","time":"2023-09-09T11:46:33.459Z","v":0}

Notes:

  • It is strange that I can reply to direct message, but I cannot initiate a direct message
  • I don't know about mastodon, but I don't think direct messages should have a subject. In fact the "content" is interpreted as extra data and the "subject" as the response.
  • When replying to a post, the message will automatically add the user you're replying to, but it wont add the full domain so if it's not a local user it'll be wrong. Sould always add the full @user@domain unless it's a local one

Addendum

  • After logging back in, it "scanned new AP area message" and then I was aable to see the post that the user I follow has publicly made (without mentioning me). However they were in the post public message section, still can't see the view public messages.

  • Some info that would be nice to add to the server in config.hjson

softwareName:null
softwareVersion:null
openRegistrations:null
name:null
description:null
maintainerName:null
maintainerEmail:null
iconUrl:null
faviconUrl:null
themeColor:null

@NuSkooler
Copy link
Owner Author

@y4my4my4m This is incredibly useful, thank you! I hope to have time this week to work on some of this

@y4my4my4m
Copy link

@NuSkooler
glad to hear! let me know how I can help

@y4my4my4m
Copy link

@NuSkooler thought i'd mention since i stumbled upon this, the info provided in the addendum is actually an attempt at standardization for activitypub, it's normally put in website.com/.well-known/nodeinfo

https://github.com/jhass/nodeinfo

@NuSkooler
Copy link
Owner Author

@NuSkooler thought i'd mention since i stumbled upon this, the info provided in the addendum is actually an attempt at standardization for activitypub, it's normally put in website.com/.well-known/nodeinfo

https://github.com/jhass/nodeinfo

Currently in this branch, Enig supports nodeinfo2: https://github.com/NuSkooler/enigma-bbs/pull/460/files#diff-3a5977a1dc5df162ebfe115c66cefca9f3bc9019376cd35791b64b64f956e5f5

We could easily support nodeinfo as well if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants