Ticket #315 (assigned enhancement)

Opened 4 years ago

Last modified 3 years ago

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

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

Description


Attachments

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

Change History

  Changed 4 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 4 years ago by tomeu

  Changed 4 years ago by tomeu

  • cc gdesmott added; cassidy removed

follow-up: ↓ 4   Changed 4 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.

in reply to: ↑ 3   Changed 4 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.

  Changed 4 years ago by sascha_silbe

  • cc sascha_silbe added

  Changed 4 years ago by tomeu

  • milestone changed from 0.86 to 0.88

  Changed 3 years ago by walter

  • owner changed from marcopg to tomeu
  • status changed from new to assigned
  • milestone changed from 0.88 to 0.90
Note: See TracTickets for help on using tickets.