raykichi / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

bug in confernece manager with proposed fix #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. join room where you are not the owner
2. other user in room who is owner grants you owner affiliation
3. the presenece packet that is sent form the server is swallowed and is 
not bubbled

What is the expected output? What do you see instead?
I expect the presence packed to be bulbled via the 

OnParticipantPresenceChange event so that my app can be aware that right 
have been granted:

In the file ConferenceManager.cs
In the method:
private void m_stream_OnProtocol(object sender, System.Xml.XmlElement rp)

change:

Current:
                // if this is ours
                if (p.From == m_jid)
                {
                    switch (m_state)
                    {
                    case STATE.join:
                        OnJoinPresence(p);
                        break;
                    case STATE.leaving:
                        OnLeavePresence(p);
                        break;
                    case STATE.running:
                        if (p.Type == PresenceType.unavailable)
                            OnLeavePresence(p);
                        break;
                    }
                }

Proposed:
                // if this is ours
                if (p.From == m_jid)
                {
                    switch (m_state)
                    {
                    case STATE.join:
                        OnJoinPresence(p);
                        break;
                    case STATE.leaving:
                        OnLeavePresence(p);
                        break;
                    case STATE.running:
                        if (p.Type == PresenceType.unavailable)
                        {
                            OnLeavePresence(p);
                        }
                        else if(mod == 
ParticipantCollection.Modification.NONE)
                        {
                            if (OnParticipantPresenceChange != null)
                                OnParticipantPresenceChange(this, party);

                        }
                        break;
                    }
                }

Original issue reported on code.google.com by BCaseyHa...@gmail.com on 28 Oct 2008 at 3:45