Bug 32986 - Add a python example showing how to ensure a channel
Summary: Add a python example showing how to ensure a channel
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/ca...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-01-11 00:13 UTC by Guillaume Desmottes
Modified: 2011-01-28 04:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2011-01-11 00:13:15 UTC
The most common question I get from newcomers in TP is generally "how can I start a chat/call from a Python script and let Empathy handles it". It's now pretty simple to do but it would be nice to have a proper example we could refer to.

I'll cook one.
Comment 2 Guillaume Desmottes 2011-01-11 03:01:46 UTC
The pygi bug seems to be fixed in master. The last issue is the lack of USER_ACTION_TIME_CURRENT_TIME but I don't think that's a blocker. I opened https://bugzilla.gnome.org/show_bug.cgi?id=639206 for it.
Comment 3 Tomeu Vizoso 2011-01-27 08:05:42 UTC
> +def create_request(action, contact_id):

Was surprised to see that it didn't returned some kind of Request object, I would rename it to create_request_dict() or something similar.

> +    # FIXME: for some reason TelepathyGLib.USER_ACTION_TIME_CURRENT_TIME is

I would add a link to the bug to increase the chances that someone will remove the FIXME once it gets fixed.

For extra readability, consider removing all abbreviations.
Comment 4 Guillaume Desmottes 2011-01-28 04:41:27 UTC
(In reply to comment #3)
> > +def create_request(action, contact_id):
> 
> Was surprised to see that it didn't returned some kind of Request object, I
> would rename it to create_request_dict() or something similar.

done.

> > +    # FIXME: for some reason TelepathyGLib.USER_ACTION_TIME_CURRENT_TIME is
> 
> I would add a link to the bug to increase the chances that someone will remove
> the FIXME once it gets fixed.

done.

> For extra readability, consider removing all abbreviations.

Good idea; I've done that.
Comment 5 Guillaume Desmottes 2011-01-28 04:44:44 UTC
Merged to master; will be in 0.13.12


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.