Modify

#663 closed enhancement (fixed)

Retrieve Twitter "mentions" timeline

Reported by: James Teh <jamie@…> Owned by: geert
Priority: minor Milestone:
Component: Twitter Version: devel
Keywords: Cc:
IRC client+version: Client-independent Operating System: Windows
OS version/distro:

Description

It would be useful if Bitlbee could retrieve the "mentions" timeline in addition to the "home" timeline for Twitter accounts. See here: http://dev.twitter.com/doc/get/statuses/mentions

Attachments (2)

twitter-mentions.patch (18.6 KB) - added by meh. <meh@…> at 2011-05-07T23:21:03Z.
First patch
twitter-mentions.diff (34.0 KB) - added by wilmer at 2011-06-11T11:20:35Z.

Download all attachments as: .zip

Change History (21)

comment:1 Changed at 2010-08-15T14:18:40Z by ilf@…

Just a "I second this" to subscribe here.

comment:2 Changed at 2010-12-03T18:26:34Z by uschebit@…

Mentions are sorely missed by me, too. While you're at it: How about twitter's direct messages?

comment:3 Changed at 2010-12-17T09:37:41Z by renchap

+1, useful feature

comment:4 Changed at 2010-12-22T11:55:08Z by MentalFS <bitlbee-bugs@…>

I'm wondering a bit why Twitter doesn't include mentions in the home view, but that's the way it is.

I'd like to see them, it does not have to be a separate channel (in chat mode), in fact that would be better for me (less clutter).

comment:5 Changed at 2010-12-22T12:04:22Z by MentalFS <bitlbee-bugs@…>

One problem I see could be old mentions popping up everytime you log in. It would be great if they could be filtered based on age or something. Like only younger than the first fetched item in the timeline.

Also, if someone you follow mentions you, that tweet shouldn't occur twice in your channel/chat.

comment:6 Changed at 2011-01-26T04:45:34Z by quintopia

I would be happy enough if the @mentions got mixed together with the main timeline in time order. That would automatically handle the old @mentions issue, since old ones would be older than your most recent tweets.

Changed at 2011-05-07T23:21:03Z by meh. <meh@…>

Attachment: twitter-mentions.patch added

First patch

comment:7 Changed at 2011-05-07T23:21:38Z by meh. <meh@…>

I made a patch for adding mentions to the timeline.

You can set if you want mentions or not by setting include_mentions to true or false.

Mentions are added only if they aren't too old, like #comment:5 suggested, same goes for multiple occurences, they're sent only once.

Plus if the message starts with @username it's replaced with the IRC nick, because some IRC clients highlight only if the message starts with the nick. I couldn't implement this yet because I don't know how to get the IRC nick , anyone can do it or tell me how to please?

Live updated patches here: https://github.com/meh/bitlbee/compare/master...twitter.diff

comment:8 Changed at 2011-05-12T08:25:20Z by wilmer

I thought you had a clean version of the patch (no whitespace changes, using tabs instead of spaces)?

Then again, I also mentioned running indent over the Twitter code since it's awfully inconsistent at the moment. Were you waiting for that?

What's the point of enable_highlight_filtering ? I suppose that can be deleted since we're not handling the hilights (the user can just set a /hilight himself if s/he wants to). Either way, new settings should always be documented.

It'd be nice to have a different polling interval for stuff like mentions and DMs at some point but no need to do that now already.

comment:9 Changed at 2011-05-12T09:05:05Z by meh. <meh@…>

Yeah sorry, the uploaded patch is old, same goes for the address.

The enable_highlight_filtering isn't present in the last patch.

The address for bzr HEAD patch is https://github.com/meh/bitlbee/compare/devel...twitter-devel.diff

This patch has no space fixing, and if I recall it uses spaces instead of tabs because it useless to tinker around with spaces if you have to run indent anyway.

comment:10 Changed at 2011-06-11T11:20:20Z by wilmer

Okay, I have to rush out a new release now to fix the followers problem. I did the indent I was going to do but want to look at this patch a bit more carefully before importing it.

To save both of us some pain, I did already generate a diff of your change post-indent, which should avoid any stupid merge conflicts.

Changed at 2011-06-11T11:20:35Z by wilmer

Attachment: twitter-mentions.diff added

comment:11 Changed at 2011-06-11T11:43:24Z by meh. <meh@…>

Ported the post-indent patch to github.

comment:12 Changed at 2011-06-11T11:58:05Z by wilmer

Perfect. I'll get to your patch, sorry for the wait, but I want to do a release this weekend and I don't like too much "new code" right in a release - it's bitten me before.

comment:13 in reply to:  12 Changed at 2011-06-11T12:14:55Z by meh. <meh@…>

Replying to wilmer:

Perfect. I'll get to your patch, sorry for the wait, but I want to do a release this weekend and I don't like too much "new code" right in a release - it's bitten me before.

No problem, better safe than sorry :)

comment:14 Changed at 2011-07-27T23:18:09Z by wilmer

I'm finally really looking at your code now. Quite happy about the implementation, mostly. :-)

Just looking at this piece:

	if (output && twitter_compare_elements(l->data, output->data) < 0) {
		continue;
	}

What's the purpose of that? I assume it's meant to prevent loads of old mentions being shown at login time? But what if the oldest mention is older than the oldest timeline message during subsequent fetches? I'd say that the user wants to see those.

(A bit hard anyway, maybe some users will expect to see older mentions even at login time.. This is one of the unanswered questions that kept me from implementing this myself. :-)

comment:15 in reply to:  14 Changed at 2011-07-28T06:53:49Z by meh@…

Replying to wilmer:

What's the purpose of that? I assume it's meant to prevent loads of old mentions being shown at login time? But what if the oldest mention is older than the oldest timeline message during subsequent fetches? I'd say that the user wants to see those.

Yeah, I did what #comment:5 said, we could make it an option though.

comment:16 Changed at 2011-07-31T23:16:57Z by wilmer

I'd prefer that. I prefer to err on the side of "too much" and let the user figure out what's new. Just like BitlBee doesn't remember the home timeline cursor across sessions. The only obvious difference here is that mentions will trigger hilights.

It can be annoying, but let's assume most people don't reconnect that often. Giving the people who do a setting would be best.

Will you or shall I?

comment:17 Changed at 2011-08-01T07:05:59Z by meh@…

Added the option show_old_mentions, which is set to true by default.

comment:18 Changed at 2011-08-25T18:09:25Z by wilmer

changeset:devel,808.

I made some changes (replaces the gbooleans with a few flags and renamed + sorted the settings) but otherwise all looks good. And it looks like it still works which is a nice bonus. :>

Would you mind also updating the help info for these new settings BTW?

comment:19 Changed at 2012-02-11T12:48:54Z by wilmer

Resolution: fixed
Status: newclosed

Oops. Looks like I forgot to close this bug. This was done in 3.0.4 already.

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.