Modify

#792 closed enhancement (fixed)

Twitter - Recieve DMs

Reported by: anonymous Owned by: geert
Priority: normal Milestone:
Component: Twitter Version: devel
Keywords: twitter, direct message, dm Cc:
IRC client+version: Client-independent Operating System: Public server
OS version/distro:

Description

Bitlbee does not recieve direct messages on Twitter. Sending works just fine.

Unsure if it's broken or simply not yet implemented.

Attachments (4)

bitlbee-3.0.3-add_basic_direct_messages.patch (11.1 KB) - added by walter+bitlbee@… at 2011-10-08T15:20:40Z.
basic direct message support
bitlbee-3.0.3-add_basic_direct_messages_PROPER.patch (12.2 KB) - added by walter+bitlbee@… at 2011-10-13T06:31:57Z.
added the missing .h diffs
bitlbee-bzr-add_basic_direct_messages_old_style.patch (11.0 KB) - added by walter+bitlbee@… at 2011-10-13T08:07:35Z.
patch against bzr tip
bitlbee-bzr-add_basic_direct_messages_old_style_FIXED.patch (11.0 KB) - added by walter+bitlbee@… at 2011-10-13T17:58:23Z.
add missing semi-colon

Download all attachments as: .zip

Change History (29)

comment:1 Changed at 2011-05-21T23:10:23Z by lkraav <leho@…>

i have also noticed more than once that i've not received a direct message that a google alert has later brought to my attention.

comment:2 Changed at 2011-06-12T12:15:15Z by wilmer

Hm. So.

http://www.marco.org/2011/05/19/twitter-dm-oauth-requirement

I wonder if this is ever going to happen at all. DMs are going to be available just for webapps, and only if your app is shiny enough, as judged by a random Twitter employee?

comment:3 Changed at 2011-07-21T15:26:34Z by litui@…

How is it that TTYtter can deal with DMs but bitlbee cannot?

comment:4 Changed at 2011-07-21T15:32:09Z by Wilmer van der Gaast <wilmer@…>

Because TTYtter has code for it and BitlBee has not.

comment:5 Changed at 2011-07-21T15:42:32Z by litui@…

Good explanation, thanks. Bump on the feature request then. =)

Changed at 2011-10-08T15:20:40Z by walter+bitlbee@…

basic direct message support

comment:6 Changed at 2011-10-08T15:26:16Z by walter+bitlbee@…

The added patch basically hacks the direct message reading support in. It doesn't tell private messages apart from public ones, but it's a start.

Own direct messages are read at login only. Others' are read every 60 secs, like the statuses.

irssi alias:
/ALIAS TWITDM /msg -bitlbee -channel #twitter_SCREENNAME d
/TWITDM SomeOne hi!

Regards,
wdoekes

comment:7 Changed at 2011-10-13T01:18:38Z by kris@…

Hello there walter! Unfortunately, I wasn't able to get your path to compile in 3.0.3.. Did you forget to include something that should've come along with the patch?

twitter_lib.c: In function 'twitter_get_direct_messages':
twitter_lib.c:578: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:580: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:588: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:591: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c: In function 'twitter_get_direct_messages_sent':
twitter_lib.c:609: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:612: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:620: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:623: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c: In function 'twitter_groupchat':
twitter_lib.c:724: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:724: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:724: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:726: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:726: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:726: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c: In function 'twitter_private_message_chat':
twitter_lib.c:772: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:772: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:772: error: 'struct twitter_data' has no member named 'direct_message_id'
twitter_lib.c:774: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:774: error: 'struct twitter_data' has no member named 'direct_message_sent_id'
twitter_lib.c:774: error: 'struct twitter_data' has no member named 'direct_message_sent_id'

Cheers, Kris

Changed at 2011-10-13T06:31:57Z by walter+bitlbee@…

added the missing .h diffs

comment:8 Changed at 2011-10-13T06:33:14Z by walter+bitlbee@…

Indeed. I forgot the .h files, it seems. Added now.

comment:9 in reply to:  8 Changed at 2011-10-13T06:47:17Z by Kris Fremen <me@…>

Replying to walter+bitlbee@…:

Indeed. I forgot the .h files, it seems. Added now.

Thanks for the quick response. I got it working with 3.0.3.

I tried to get it working with the current bzr tip, but it just hanged on the function twitter_flush_timeline..

It's probably something that I missed due to lack of sleep and I did have to modify some functions too...

Would it be too much to ask of you to update your patch to work against the bzr tip?

twitter.c
twitter_lib.c

Here is my try at patching the tip with your patch, maybe it'll save you some time :)
Maybe I'm missing something very simple and I just don't see it...

Thank you for the patch!

Cheers,
Kris

Changed at 2011-10-13T08:07:35Z by walter+bitlbee@…

patch against bzr tip

comment:10 Changed at 2011-10-13T08:13:47Z by walter+bitlbee@…

Ok.. I see some work has been done to sort the output. The direct messages could make use of that as well, but I didn't mess with that right now. The patched version simply outputs the messages directly (unsorted) like in 3.0.3.

N.B.: only tested that it compiles N.B.2.: it looks like they broke/removed the next_cursor functionality by including get_mentions in get_timeline => the whole next_cursor argument should probably be removed now. but that is of no relevance to this patch.

comment:11 in reply to:  10 Changed at 2011-10-13T10:48:54Z by Kris Fremen <me@…>

Replying to walter+bitlbee@…:

Ok.. I see some work has been done to sort the output. The direct messages could make use of that as well, but I didn't mess with that right now. The patched version simply outputs the messages directly (unsorted) like in 3.0.3.

N.B.: only tested that it compiles N.B.2.: it looks like they broke/removed the next_cursor functionality by including get_mentions in get_timeline => the whole next_cursor argument should probably be removed now. but that is of no relevance to this patch.

Hi there, quick response again :)

It does compile, yes, but doesn't fetch the direct messages at all as far as I could see..

Cheers,
Kris

comment:12 Changed at 2011-10-13T17:57:43Z by walter+bitlbee@…

Ok ok.. I missed a semi-colon, causing the DM's to get re-fetched every minute. But otherwise it works just like the 3.0.3 patch: shitty, but usable ;)

Changed at 2011-10-13T17:58:23Z by walter+bitlbee@…

add missing semi-colon

comment:13 Changed at 2011-10-20T03:08:22Z by wilmer

Going over the patch a bit now - I'm not yet ready to merge but just curious. :-)

Your idea of halfing the fetch interval and doing one fetch at a time is interesting. I myself actually hoped to have different intervals for DMs (and ideally also mentions), since IMHO it should be enough to do those only once ever five minutes, for example. It's good to avoid upsetting Twitter's rate limiting.

Does that sound reasonable to you? Of course we can make the intervals configurable.

comment:14 Changed at 2011-10-20T06:33:46Z by walter+bitlbee@…

I'm not yet ready to merge

Haha, I can agree with you there. In the bzr head it became even more of a hack =)

since IMHO it should be enough to do those only once ever five minutes

Well.. I don't do any twitter myself, but I was hoping I could communicate with the Mrs. with something she *does* have installed on her smartphone. And then twitter DM sprung to mind.

Lowering the DM rate here would be the inverse of my needs. Although I do understand that the apps on her phone aren't that quick in refreshing DMs either.

comment:15 Changed at 2011-10-20T13:23:06Z by Wilmer van der Gaast <wilmer@…>

Lowering the DM rate here would be the inverse of my needs. Although I do
understand that the apps on her phone aren't that quick in refreshing DMs
either.


Some apps use the streaming API and are pretty quick though. Anyway,
maybe I forgot to mention that it should also be configurable and 5m
would just be the default.

comment:16 Changed at 2012-05-18T23:03:40Z by sergiosdj@…

Hi,

Is this patch going to be checked in?

Thanks.

comment:17 in reply to:  description Changed at 2012-09-30T04:18:36Z by andre@…

Hello,

+1 for this feature. Is it still planned for an upcoming release?

Thank you!

comment:18 Changed at 2012-10-01T23:05:45Z by wilmer

Ergh, I lost track of this patch entirely. :-( Will take a look soonish.

comment:19 Changed at 2012-10-12T19:39:27Z by ilf@…

Will the received DMs be displayed according to $handle_unknown, in plain english: in query windows?

comment:20 Changed at 2012-10-12T19:55:29Z by Wilmer van der Gaast <wilmer@…>

Unknown? You get DMs from people you don't follow?

comment:21 in reply to:  20 Changed at 2012-10-12T20:04:58Z by ilf

You're right. What ever is the "normal" way of 1to1 communication in BitlBee. I forgot if there's an even an option, since I only use it in query windows.

comment:22 Changed at 2012-10-12T20:11:52Z by Wilmer van der Gaast <wilmer@…>

"set private" probably. :-)

comment:23 Changed at 2012-11-25T12:09:15Z by wilmer

changeset:json,972 now does this with the streaming API instead. Which is very nice because there's pretty much no delay in receiving them. (And no empty polls 99.9% of the time.)

And again I forgot there was a patch for this already, which by now I don't even need anymore. Very sorry, Walter. :-(

comment:24 Changed at 2012-11-25T12:26:23Z by walter+bitlbee@…

Haha! No worries :) Thanks for fixing.

comment:25 Changed at 2012-12-07T00:04:14Z by wilmer

Resolution: fixed
Status: newclosed

Closing this one in favour of #996. This bug has been fixed in the JSON branch (streaming mode only), which will be merged and release fairly soon.

Modify Ticket

Action
as closed The owner will remain geert.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.