ssbc / scuttle-tag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scuttleTag.pull.messagesTaggedBy

christianbundy opened this issue · comments

Patchwork is currently using scuttleTag.pull.messagesTaggedBy, but it doesn't look like that's supported in the latest version of scuttle-tag. What should our upgrade path look like?

cc: @wittjosiah
ref: ssbc/patchwork#886


TypeError: scuttleTag.pull.messagesTaggedBy is not a function
    at channel (/home/christianbundy/src/ssbc/patchwork/modules/page/html/render/tag.js:49:39)
    at /home/christianbundy/src/ssbc/patchwork/node_modules/depject/apply.js:18:30
    at loadView (/home/christianbundy/src/ssbc/patchwork/modules/app/views.js:88:20)
    at Object.setView (/home/christianbundy/src/ssbc/patchwork/modules/app/views.js:103:7)
    at getExternalHandler (/home/christianbundy/src/ssbc/patchwork/main-window.js:224:15)
    at getExternalHandler (/home/christianbundy/src/ssbc/patchwork/main-window.js:246:7)
    at navigate (/home/christianbundy/src/ssbc/patchwork/main-window.js:218:5)
    at click (/home/christianbundy/src/ssbc/patchwork/main-window.js:200:19)
    at CallbacksRegistry.apply (/usr/lib/electron/resources/electron.asar/common/api/callbacks-registry.js:47:25)
    at EventEmitter.ipcRenderer.on (/usr/lib/electron/resources/electron.asar/renderer/api/remote.js:277:21)

@christianbundy I forgot about this...I accidentally published a new version of scuttle-tag which should really have been a beta release. I haven't done much work on it since so it definitely shouldn't be upgraded yet. I don't think anyone else is using this right now, so perhaps it would be best to just unpublish 0.5.0, but open to suggestions.

No problem, breaking changes are always expected at 0.x.x, I'm just looking to see what I should do to replace the previous functionality. Is there a better way to go about what we were previously doing, or will messagesTaggedBy be added back?

I ran into some issues with sort order when collecting the stream into tagged messages rather than just having a stream of tags. I simplified scuttle-tag to just supply a stream of tags based on %AIFgbDY87J9FrzCNdXdEOLLE20wm+M1USLKIXtdQxN0=.sha256 and was in progress of updating the Patchwork integration when I got sidetracked by other work.

Due to the possibility that tags are "removed" the collect function is a bit more complicated and I don't think can be done with ssb-query, because of this I think its unlikely messagesTaggedBy will come back and going forward would be replaced by tagsFrom and the client can choose how to render tag removals.

Interesting, thanks. Was messagesTaggedByWith also removed in favor of tagsFrom? Sorry for all the prodding, my goal here is to figure out the best way forward with up-to-date NPM deps.

messagesTaggedByWith would be superseded by tagsOfFrom. I just pushed the work I did to integrate 0.5.0 with Patchwork here: https://github.com/ssbc/patchwork/compare/scuttle-tag-next. However, its definitely not ready to go yet. If you or someone else wanted to try and finish it they don't need to feel like they are stepping on any toes, I would be happy to help by answering questions I just don't have the capacity to dig into it right now unfortunately.

No problem. Would you be comfortable opening a [WIP] pull request for that? I'd love to know which bits you feel need more polish, that way we can have the Patchwork-specific discussion on the PR rather than in this repo.