Bug 221053 - The message from the XMPP Server is not displayed.
Summary: The message from the XMPP Server is not displayed.
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.providers (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2008-03-02 04:36 EST by Hiroyuki Inaba CLA
Modified: 2008-03-17 10:38 EDT (History)
2 users (show)

See Also:


Attachments
broadcast.png (68.77 KB, image/png)
2008-03-04 07:54 EST, Hiroyuki Inaba CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroyuki Inaba CLA 2008-03-02 04:36:55 EST
I use Openfire 3.4.5 server.
The message from the XMPP Server is not displayed. 

On XMPPContainerPresenceHelper.handleMessageEvent(),
fromID is null.

org.jivesoftware.smack.packet.Message
	body	"000\n"	
	error	null	
==>	from	"w2k-tw"	
	packetExtensions	null	
	packetID	"ID_NOT_AVAILABLE"	
	properties	null	
	subject	null	
	thread	null	
	to	null	
	type	Message$Type  (ID=1014)	

It is because there is no the from field in the form of user@server.
Comment 1 Scott Lewis CLA 2008-03-03 15:15:08 EST
Hiroyuki,

Could you explain the meaning of the 'from' field in org.jivesoftware.smack.packet.Message

==>     from    "w2k-tw"        

i.e. what is this string "w2k-tw".  Is this a server name that you specified, or is it fixed for a given version of the OpenFire server?

What I expect to do about this bug is create a special XMPPID for messages from the system.  

Also...is there some way that the system message is indicated (i.e. in the Message$Type?).

Thanks for info.
Comment 2 Hiroyuki Inaba CLA 2008-03-04 06:57:45 EST
> Is this a server name that you specified,

Yes, "w2k-tw" is a server name.

The event object from three clients is shown as follows. 

1) Spark client

event	org.eclipse.ecf.internal.provider.xmpp.events.MessageEvent  (ID=6435)	
	message	org.jivesoftware.smack.packet.Message  (ID=6436)	
		body	"message from Spak client"	
		error	null	
		from	"helios@w2k-tw/spark"	
		packetExtensions	java.util.ArrayList<E>  (ID=6439)	
		packetID	"7IqTD-40"	
		properties	null	
		subject	null	
		thread	"dYc8Ot"	
		to	"inaba@w2k-tw"	
		type	org.jivesoftware.smack.packet.Message$Type  (ID=6414)	
			value	"chat"	
	xhtmlbodies	null	

2) ECF XMPP client

event	org.eclipse.ecf.internal.provider.xmpp.events.MessageEvent  (ID=6514)	
	message	org.jivesoftware.smack.packet.Message  (ID=6516)	
		body	"message ECF XMPP client"	
		error	null	
		from	"pegasus@w2k-tw/ECF_XMPP"	
		packetExtensions	null	
		packetID	"Rwf7I-6"	
		properties	null	
		subject	null	
		thread	"qhQK81"	
		to	"inaba@w2k-tw"	
		type	org.jivesoftware.smack.packet.Message$Type  (ID=6414)	
			value	"chat"	
	xhtmlbodies	null	

3) Openfile Administration Console

event	org.eclipse.ecf.internal.provider.xmpp.events.MessageEvent  (ID=6492)	
	message	org.jivesoftware.smack.packet.Message  (ID=6494)	
		body	"message from Openfire server console\n"	
		error	null	
		from	"w2k-tw"	
		packetExtensions	null	
		packetID	"ID_NOT_AVAILABLE"	
		properties	null	
		subject	null	
		thread	null	
		to	null	
		type	org.jivesoftware.smack.packet.Message$Type  (ID=6381)	
			value	"normal"	
	xhtmlbodies	null	
Comment 3 Hiroyuki Inaba CLA 2008-03-04 07:54:18 EST
Created attachment 91506 [details]
broadcast.png

How about the method of the correction as attachment. 

It made it to an attached way in the modification of
org.eclipse.ecf.presence.ui/
  src/org/eclipse/ecf/presence/ui/MessagesView.java
  src/org/eclipse/ecf/internal/presence/ui/Messages.java
  src/org/eclipse/ecf/internal/presence/ui/Messages.properties
Comment 4 Scott Lewis CLA 2008-03-09 20:31:30 EDT
Fix applied to XMPPContainerPresenceHelper.createIDFromName.  The fix was to create a from ID with 'admin@<hostname>' if the org.jivesoftware.smack.packet.Message does not have any '@' in it (only the host is given in the 'from' field).  So, for the case given in

org.jivesoftware.smack.packet.Message
        body    "000\n" 
        error   null    
==>     from    "w2k-tw"        
...

The fromID should now have value "admin@w2k-tw"

Marking as fixed.   Thanks for the report.
Comment 5 Hiroyuki CLA 2008-03-17 10:38:54 EDT
I think that you should not add "admin" when there is no fromID.
I always think the account "admin" to be no manager account. 
The message can be sent to "admin" in the chat window.