Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
ianrathbone #1
Member since Jun 2018 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: The Message object and MessageType.Normal
Hello, I understand via RFC 3921 the Message Type field is considered optional and should consider a null object "normal".

However I thought it wise to inform you that via our XMPP Messaging Server we have been using that we have seen significant errors while using your library and setting the message type to normal.

It appears that even though we are (via constructor or property setting) not able to ever set the message type as "normal", it appears to be stripped out of the final XML message.

I can understand that this may be intentional but it may be counter productive for some environments that are not strictly following the specification and it would be useful if we could manually set the message type as normal.

Thank you.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You can use the SetAttribute member on the message object and set it to normal.
We will also review the sources here again and give you a update.

Alex
Avatar
Alex #3
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello ianrathbone,

you can see the code for the message type here:
https://github.com/matrix-xmpp/matrix-vnext/blob/master/sr…

We are using it like that for over 10 years and have never seen an issue. However we may take a look at it again and see if we should change the bahaviour and write and atribute also for the normal default type. We have to be very careful whith sich a change, it could break many existing users of MatriX.

Which XMPP server product are you using?

You can also create your own message class by deriving from the existing class and registering it in the factory. Then you can add you own code for message types, or overwrite the existing code.

Alex
Avatar
ianrathbone #4
Member since Jun 2018 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex much appreciated!

We've already gone with the solution you mentioned - to derive from the class and it works great.

The product we are using is from Broadsoft - and to be honest I don't know if a lot of people would notice as it's buried away in the logs!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: