Bug 32986

Summary: Add a python example showing how to ensure a channel
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/cassidy/telepathy-glib;a=shortlog;h=refs/heads/python-request-32986
Whiteboard: review+
i915 platform: i915 features:

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.