Opened 13 years ago

Last modified 10 years ago

#2963 assigned defect

Sugar telepathy code does not take into account presence status of buddies

Reported by: alsroot Owned by: erikos
Priority: Normal Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Unspecified Keywords:
Cc: sascha_silbe Distribution/OS:
Bug Status: Unconfirmed

Description

Thats a regression from 0.88.

Current code in 0.9x relies (looks like) only on roster to assume what buddies is online. Thats sounds like reimplementing the wheel within jabber protocol, since there is presence state of buddies for that case. Even if it was done due to optimization reasons, it breaks workflow for non-sugar buddies (though, this workflow is not well supported in sugar).

In any case, 0.88 behaves more standard and do not show offline buddies in F1 view.

Attachments (1)

2963.patch (11.1 KB) - added by alsroot 13 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 follow-up: Changed 13 years ago by dsd

Do you have a reference to the jabber protocol which explains what you describe?

I'm not knowledgeable on the protocol details, but my impression was that the jabber protocol only offers presence information for your buddies - people that you have explicitly marked as a buddy (and that have accepted you as well?). In order to get to that stage, you need to have access to a roster to see who the available buddies are.

I believe the design is/was to use a group called @online@ which shows you the online users without having to be friends with them.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 13 years ago by alsroot

Replying to dsd:

Do you have a reference to the jabber protocol which explains what you describe?

I'm not knowledgeable on the protocol details, but my impression was that the jabber protocol only offers presence information for your buddies - people that you have explicitly marked as a buddy (and that have accepted you as well?). In order to get to that stage, you need to have access to a roster to see who the available buddies are.

I believe the design is/was to use a group called @online@ which shows you the online users without having to be friends with them.

My concern is exactly to follow the protocol on client side, i.e., sugar client code should not show users in F1 view if they are offline. If I got it right, @online@ is a roster that is being automatically populated with users that present (in some meaning) on the server.

The problem is that if this @online@ roster contains offline users, PS-0.88 does not show them but sugar-0.9x does. In my mind will @online@ contain offline users or not is entirely server side magic, the client should just follow the standard, ie, fo not show offline users in F1 view even if they come from @online@ roster.

comment:3 in reply to: ↑ 2 Changed 13 years ago by alsroot

Replying to alsroot:

Replying to dsd:

Do you have a reference to the jabber protocol which explains what you describe?

I'm not knowledgeable on the jabber protocol as well, but it is obvious that offline users should be either explicitly marked as offline or hidden. The 0.9x behaviour is showing all uses in F1.

comment:5 Changed 13 years ago by alsroot

Actually, my concern is only about how client behaves (not about how @online@/whatever implemented on server side).

For example, being connected to jabber.sugarlabs.org in my jabber client, I see only 32 online users (there are 2K of users in current @online@ roster on jabber.sl.o, why? it is another question and will be improved soon), as PS-0.88, but recent 0.92 (from sucrose-0.92 branch) shows several times more (it looks like I see offline users in F1).

Client, at least, should not show offline users like 0.88 and any decent jabber clients (or show offline status) do.

comment:6 Changed 13 years ago by dsd

Thanks for the explanation - I agree. If it's a simple condition to check for, sugar should avoid displaying these offline roster members.

comment:7 Changed 13 years ago by alsroot

Actually, existed code does some logic basing on presence state (but not all needed). Attached patch switches the code to presence status driven logic completely and does initial buddies fetch in more reliable way.

Patch was tested on Prosody (http://git.sugarlabs.org/server/prosody-sugar) and being merged with #2964 patch, it seems to work better.

Changed 13 years ago by alsroot

comment:8 Changed 13 years ago by sascha_silbe

  • Cc sascha_silbe added
  • Distribution/OS Unspecified deleted
  • Owner set to erikos
  • Status changed from new to assigned

comment:9 Changed 10 years ago by walter

  • Priority changed from Unspecified by Maintainer to Normal
Note: See TracTickets for help on using tickets.