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

Customize topic name #85

Open
AMontagu opened this issue Nov 8, 2018 · 1 comment
Open

Customize topic name #85

AMontagu opened this issue Nov 8, 2018 · 1 comment

Comments

@AMontagu
Copy link
Contributor

AMontagu commented Nov 8, 2018

Hello !

Thank you for this project !

I need to transfer files from a client to an other client. Depending of the topic the final client change. I have already all logic to dispatch the message from the server depending of the topic name.

My question: Are you interested in a PR to allow customizing topic name ?

ex:

socket.emit(`${customTopic}_progress`, {
				id: id,
				size: file.size,
				start: start,
				end: end,
				content: content,
				base64: isBase64
			});

I need to do it anyway. But if you want I can share my result in a PR and take any good advice from you before do so.

@sffc
Copy link
Owner

sffc commented Nov 8, 2018

Sure! For example, call the new option messageNamePrefix, and have it default to siofu.

For the unit test, probably just set some arbitrary custom value to the new option, and assert on the server side and client side that the received messages names are consistent.

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

No branches or pull requests

2 participants