Proposed twitter widget change

Topics: Controls
Feb 26, 2011 at 8:13 AM

Hi. I've just upgraded my blog to 2.0. The update went pretty smooth I have to say. Thank you for your continued efforts with this project. 

One thing I did however was customize the Twitter widget (I had done this in 1.6 already), and I thought maybe it would be worth considering this change for the main trunk too.

Issue: the Twitter widget filters any tweets that contain the "@" sign. This is considerably different from normal Twitter behavior where only those tweets of a person you follow are filtered that start with an "@" (and are targeted at a person you do not follow, but that's a different story). This means that the Twitter widget misses e.g. retweets, tweets you send with /cc, and tweets you deliberately wanted to make available to your followers by not letting them begin with "@" (e.g. a common way to do this is to let it start with ". @" or similar, or mention the targeted account at the end etc.).

Solution: Ever since 1.6 I had changed the responsible part in the BindFeed method of the widget.ascx.cs to something like:

// reversed order:
// first cut off the user handle (and trim), then check for "@"
if (title.Contains(":"))
	var start = title.IndexOf(":") + 1;
	title = title.Substring(start).Trim();

// check if the tweet STARTS WITH @ (not contains)
if (title.StartsWith("@"))

Mar 24, 2011 at 11:08 AM

Just what I needed to make the widget work properly.

Thank you very much,