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

Attach meta data to message #49

Closed
sualko opened this issue Mar 7, 2014 · 4 comments
Closed

Attach meta data to message #49

sualko opened this issue Mar 7, 2014 · 4 comments

Comments

@sualko
Copy link
Contributor

sualko commented Mar 7, 2014

I want to implement XEP-0184 (received notifications) and for that reason I have to attach an unique id to a sending message and bind it to the plaintext message. Now the problem, how can I do this with the current implementation?

{msg: "foo", id: "bar"}  -----> OTR.sendMsg()  -----> build xml stanza with id

Because I think there is no working solution, I added an extra parameter to the sendMsg method which will be passed through to the io event handler. What do you think about that? Are you interested in a pr?

Regards,
Klaus

@arlolra
Copy link
Owner

arlolra commented Mar 7, 2014

OTR should be agnostic to the underlying transport protocol. What do you do in the case where it fragments the message?

I need to read up a bit about this XEP before commenting further. Not quite sure what you're trying to accomplish.

FYI, there's an implementation here: https://github.com/strophe/strophejs-plugins/blob/master/receipts/strophe.receipts.js

ps. Sorry for the slow replies; you caught me travelling.

@sualko
Copy link
Contributor Author

sualko commented Mar 9, 2014

The XEP defines a possibility to get receive notifications (interesting for mobile use) and for this you need a unique id in the message tag.

What do you do in the case where it fragments the message?

I didn't thought about that, but that should be easy to handle, because I could attach the plaintext message as meta data and save this together with the generated id.

FYI, there's an implementation here: https://github.com/strophe/strophejs-plugins/blob/master/receipts/strophe.receipts.js

I know this implementation, but it's crap and the XEP is not very complex.

@arlolra
Copy link
Owner

arlolra commented Mar 11, 2014

What do you think about that? Are you interested in a pr?

Ok, yes, this sounds good. Please try to do it in a backwards compatible way.

@arlolra
Copy link
Owner

arlolra commented Mar 22, 2014

Closed by #50.

@arlolra arlolra closed this as completed Mar 22, 2014
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