Swapdoodle
Swapdoodle était l’un des premiers titres sur lesquels Dani souhaitait travailler, avant de rejoindre notre équipe de développement principale. Après son arrivée, l’attention s’est portée sur autre chose et le travail sur Swapdoodle a été interrompu assez tôt. Cependant, grâce au travail des contributeurs externes Silver-Volt4 et CenTdemeern1 , le travail sur Swapdoodle a repris ! Ils ont pris l’initiative de mettre en œuvre l’intégralité du serveur, avec des résultats prometteurs ! Pour plus d’informations, voir :
Hello, me and my friend have implemented Swapdoodle and it’s very close to completion. The note relaying is functional, and the only things that are left to do are code cleanup and ironing out a few minor issues.
Would it be possible for us to work with you on this? We’d be delighted to see Swapdoodle back one day and hope we could perhaps help with that.
GitHub repo: GitHub - SwapdoodleRevival/hpp-server
Mastodon post with screenshots: Charlotte (@CenTdemeern1) | Eepy Moe
main ← SwapdoodleRevival:main
opened 09:40PM - 27 May 25 UTC
Resolves [this forum thread](https://forum.pretendo.network/t/we-implemented-swa… pdoodle-and-would-like-to-contribute-it/16204/6)
### Changes:
Adds an implementation for Swapdoodle. This uses Jon's unfinished DataStore rework (https://github.com/PretendoNetwork/nex-protocols-common-go/pull/53).
The server currently doesn't work _out of the box_ due to the incomplete state of the DataStore rework. There are some quirks I discovered that I wanted to discuss here, instead of polluting the DataStore PR with possibly Swapdoodle-specific info. This would be:
- [object_enabled.go:27](https://github.com/PretendoNetwork/nex-protocols-common-go/blob/ae941d444e29ee190f23f096ccccec8e77b1728d/datastore/database/object_enabled.go#L27): Swapdoodle seems to be uploading doodles with the `needUploadCompletion` flag set to false, which in turn causes [uploadCompleted to be set to true](https://github.com/PretendoNetwork/nex-protocols-common-go/blob/ae941d444e29ee190f23f096ccccec8e77b1728d/datastore/database/insert_object_by_prepare_post_param.go#L194), and so CompletePostObjectV1 fails. Additionally, since ObjectEnabled also checks for `state == 0`, the file is actually never accepted because it's [always initialized to 0](https://github.com/PretendoNetwork/nex-protocols-common-go/blob/ae941d444e29ee190f23f096ccccec8e77b1728d/datastore/database/insert_object_by_prepare_post_param.go#L187) but that's likely to be fixed anyway
- ~~[This callback](https://github.com/SwapdoodleRevival/swapdoodle/blob/6acba3f8d8e1889e4fc8d45e780923e9907158d0/nex/register_protocols.go#L43) is actually never run, because CompletePostObjectV1 does not call it. This likely won't be needed in the future when notification support is added to the package, I'm currently creating notifications manually for the sake of maintaining functionality~~ Notifications are now supported, so this is no longer relevant
With the two quirks patched out locally via a Go workspace, I have confirmed the server to correctly relay notes.
<hr>
- [X] I have read and agreed to the [Code of Conduct](https://github.com/PretendoNetwork/Pretendo/blob/master/.github/CODE_OF_CONDUCT.md).
- [X] I have read and complied with the [contributing guidelines](https://github.com/PretendoNetwork/Pretendo/blob/master/.github/CONTRIBUTING.md).
- [ ] What I'm implementing was an [approved issue](../issues?q=is%3Aopen+is%3Aissue+label%3Aapproved). (it theoretically wasn't?)
- [X] I have tested all of my changes.
Donc ca fonctionne ?