From 73ee390abec21c2b724175d4a5c9cfc27aa85bcf Mon Sep 17 00:00:00 2001 From: jgeboski Date: Mon, 15 Dec 2014 07:17:12 -0500 Subject: twitter: implemented filter based group chats Filter group chats allow for the ability to read the tweets of select users without actually following the users, and/or track keywords or hashtags. A filter group chat can have multiple users, keywords, or hashtags. These users, keywords, or hashtags can span multiple group chats. This allows for rather robust filter organization. The underlying structure for the filters is based on linked list, as using the glib hash tables requires >= glib-2.16 for sanity. Since the glib requirement of bitlbee is only 2.14, linked list are used in order to prevent an overly complex implementation. The idea for this patch was inspired by Artem Savkov's "Twitter search channels" patch. In order to use the filter group chats, a group chat must be added to the twitter account. The channel room name is either follow:username, track:keyword, and/or track:#hashtag. Multiple elements can be used by separating each element by a semicolon. --- protocols/twitter/twitter_lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols/twitter/twitter_lib.h') diff --git a/protocols/twitter/twitter_lib.h b/protocols/twitter/twitter_lib.h index 7fd3b808..ee103100 100644 --- a/protocols/twitter/twitter_lib.h +++ b/protocols/twitter/twitter_lib.h @@ -78,9 +78,12 @@ /* Report spam */ #define TWITTER_REPORT_SPAM_URL "/users/report_spam.json" +/* Stream URLs */ #define TWITTER_USER_STREAM_URL "https://userstream.twitter.com/1.1/user.json" +#define TWITTER_FILTER_STREAM_URL "https://stream.twitter.com/1.1/statuses/filter.json" gboolean twitter_open_stream(struct im_connection *ic); +gboolean twitter_open_filter_stream(struct im_connection *ic); gboolean twitter_get_timeline(struct im_connection *ic, gint64 next_cursor); void twitter_get_friends_ids(struct im_connection *ic, gint64 next_cursor); void twitter_get_statuses_friends(struct im_connection *ic, gint64 next_cursor); -- cgit v1.2.3