Opened 12 years ago

Closed 8 years ago

Last modified 8 years ago

#315 closed enhancement (wontfix)

add a way to add new contacts not seen by the PS

Reported by: tomeu Owned by: tomeu
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords:
Cc: gdesmott, sascha_silbe Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description


Attachments (1)

add_contacts.patch (2.6 KB) - added by tomeu 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by tomeu

  • Cc cassidy added

This patch is a first step towards implementing this feature, though there's lots of work still to do.

Changed 12 years ago by tomeu

comment:2 Changed 12 years ago by tomeu

  • Cc gdesmott added; cassidy removed

comment:3 follow-up: Changed 12 years ago by gdesmott

Some comments:

  • imports should be done at the begin of the file
  • there should have UI asking for the identifier to add (instead of hardcoding "tomeu-test@…")
  • UI should also list the existing TP connections and let the user choose the one to which the contact have to be added (instead of taking the first connection from conn_watcher.get_connections())
  • You should use the new Requests API. Something like that:

channel_path, props = connection[CONNECTION_INTERFACE_REQUESTS].EnsureChannel(
CHANNEL_INTERFACE + ".ChannelType": CHANNEL_TYPE_CONTACT_LIST,
CHANNEL_INTERFACE + ".TargetHandleType": CONNECTION_HANDLE_TYPE_LIST,
CHANNEL_INTERFACE + ".TargetID": 'subscribe')

So you don't need to request the subscribe handle any more.

  • You should probably add the contact to the 'publish' contact list too. Maybe that should be done once the contact accepted your request but we can start like that for now.

See also https://dev.laptop.org/ticket/8841 where Rob described what should be done to properly manager buddy subscriptions.

comment:4 in reply to: ↑ 3 Changed 12 years ago by tomeu

Replying to gdesmott:

Some comments:

  • imports should be done at the begin of the file
  • there should have UI asking for the identifier to add (instead of hardcoding "tomeu-test@…")
  • UI should also list the existing TP connections and let the user choose the one to which the contact have to be added (instead of taking the first connection from conn_watcher.get_connections())

Sure, this patch wasn't proposed for inclusion, just attached it for reference when we get to actually implement this feature.

  • You should use the new Requests API. Something like that:

channel_path, props = connection[CONNECTION_INTERFACE_REQUESTS].EnsureChannel(
CHANNEL_INTERFACE + ".ChannelType": CHANNEL_TYPE_CONTACT_LIST,
CHANNEL_INTERFACE + ".TargetHandleType": CONNECTION_HANDLE_TYPE_LIST,
CHANNEL_INTERFACE + ".TargetID": 'subscribe')

So you don't need to request the subscribe handle any more.

  • You should probably add the contact to the 'publish' contact list too. Maybe that should be done once the contact accepted your request but we can start like that for now.

That's good to know, thanks!

See also https://dev.laptop.org/ticket/8841 where Rob described what should be done to properly manager buddy subscriptions.

That's good info, will enter individual tickets for the smaller pieces.

comment:5 Changed 12 years ago by sascha_silbe

  • Cc sascha_silbe added

comment:6 Changed 12 years ago by tomeu

  • Milestone changed from 0.86 to 0.88

comment:7 Changed 11 years ago by walter

  • Milestone changed from 0.88 to 0.90
  • Owner changed from marcopg to tomeu
  • Status changed from new to assigned

comment:8 Changed 8 years ago by dnarvaez

  • Resolution set to wontfix
  • Status changed from assigned to closed

Given the issues we have with the collaboration framework I don't think this is a priority.

comment:9 Changed 8 years ago by dnarvaez

  • Milestone 0.90 deleted

Milestone 0.90 deleted

Note: See TracTickets for help on using tickets.