Ignore:
Timestamp:
2015-01-26T03:46:03Z (9 years ago)
Author:
jgeboski <jgeboski@…>
Branches:
master
Children:
dfaa46d
Parents:
5eab298f
git-author:
jgeboski <jgeboski@…> (15-12-14 12:17:12)
git-committer:
jgeboski <jgeboski@…> (26-01-15 03:46:03)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.h

    r5eab298f r73ee390  
    4545} twitter_flags_t;
    4646
     47typedef enum
     48{
     49        TWITTER_FILTER_TYPE_FOLLOW = 0,
     50        TWITTER_FILTER_TYPE_TRACK
     51} twitter_filter_type_t;
     52
    4753struct twitter_log_data;
    4854
     
    5864
    5965        GSList *follow_ids;
     66        GSList *filters;
    6067       
    6168        guint64 last_status_id; /* For undo */
    6269        gint main_loop_id;
     70        gint filter_update_id;
    6371        struct http_request *stream;
     72        struct http_request *filter_stream;
    6473        struct groupchat *timeline_gc;
    6574        gint http_fails;
     
    7786        struct twitter_log_data *log;
    7887        int log_id;
     88};
     89
     90#define TWITTER_FILTER_UPDATE_WAIT 3000
     91struct twitter_filter
     92{
     93        twitter_filter_type_t type;
     94        char *text;
     95        guint64 uid;
     96        GSList *groupchats;
    7997};
    8098
Note: See TracChangeset for help on using the changeset viewer.