ueberdosis / hocuspocus

The CRDT Yjs WebSocket backend for conflict-free real-time collaboration in your app.
https://tiptap.dev/docs/hocuspocus/introduction
MIT License
1.34k stars 128 forks source link

Allow token fn to return null #830

Closed fuadsaud closed 5 months ago

fuadsaud commented 5 months ago

The token passed as a value can be null already, so the code that calls the function will continue to work as intended.

Allowing a null value makes it possible to still open a connection without a token while attempting to fetch the token in an async function.

janthurau commented 5 months ago

hey @fuadsaud, thanks for your PR! Unfortunately there are so many formatting changes, I have no idea what you actually did .. Can you create a new PR without reformatting please? 🙏

fuadsaud commented 5 months ago

@janthurau sorry about that, I think prettier kicked in when I commited the file and I didn't double check the diff after that.

I made a new PR 🙏 .