aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter_lib.c
Commit message (Collapse)AuthorAgeLines
* Twitter: fix format strings for integersAlex Schroeder2017-08-09-10/+10
| | | | | | | Silence the following compiler warning: format specifies type 'unsigned long long' but the argument has type 'guint64'. When formatting a json_integer, use PRId64 for int64_t. When formatting ordinary integers, use G_GUINT64_FORMAT for guint64.
* twitter: experimental support for place_iddequis2017-04-11-0/+7
|
* Expand each (media) URL only once. Twitter likes duplication. #1275.Wilmer van der Gaast2016-11-27-3/+5
|
* Heh, oops, some error in the Twitter module still mentioned XML. Fixed.Wilmer van der Gaast2016-11-23-1/+1
| | | | | Some structs still have xml in their name but meh, at least that's not visible to the user.
* twitter: fix quoted tweet expansion in extended tweetsdequis2016-10-02-5/+14
| | | | | | | | | | | | The outermost entities object only contains the url of the compat tweet, the one linking to /i/web/status/[...] The inner entities object, inside the "extended_tweet", is the one that contains the quoted tweet url that we're supposed to replace. But expand_entities() assumed that the quoted_status object would be next to entities, which doesn't apply in the case of extended tweets. So now it gets an extra parameter to look for entities.
* twitter: don't count filter stream reply as valid pongsdequis2016-09-24-1/+4
| | | | | | | | | | | | | | | | | Twitter streams send newlines to indicate that they are alive. The twitter_http_stream() function processes those and sets the ponged flag so that the whole connection doesn't timeout. That function is used to handle both user stream and filter stream. If the user stream is dead (not sending whitespace) but the filter stream isn't, the latter keeps the connection alive while the main twitter channel is completely dead. This commit only sets the ponged flag for the user stream. This has the side effect of not detecting if the filter stream dies - but that didn't work before, anyway. In the future the whole stream connection management should be revamped - for example stream disconnections shouldn't take the whole account down, especially not filter streams.
* twitter: extended tweet support (AKA avoid showing truncated ones)dequis2016-09-21-13/+22
| | | | | | | | | | | | | Documentation over here: https://dev.twitter.com/overview/api/upcoming-changes-to-tweets This is already live in twitter, can be tested by including an attachment from twitter web and then fill 140 characters. Should be sanely backwards compatible with twitter clones - i'd expect them to ignore the tweet_mode=extended parameter in REST queries, and just not deliver extended_tweet objects / full_text strings at all.
* twitter: don't hard-fail with mutes or noretweets (for "identica")dequis2016-07-25-0/+10
| | | | | | Fixes trac ticket 1254 Kinda dirty but better than keeping it broken.
* twitter: Fix a couple of leaks of mutes_ids and retweets_idsdequis2016-04-17-8/+4
| | | | | | | Just freeing the list on logout and when removing items from them. Also remove the "checking mutes" debug which is disproportionately noisy compared to the rest of the protocol.
* Avoid adding an id twice to the mutes list.Flexo2016-04-01-7/+26
| | | | | | | Twitter doesn't error if you mute the same user multiple times. Also, correct signedness of the stringified user ids. bitlbee keeps them as unsigned even if the json library uses signed for integers...
* Receive mute/unmute notifications from the stream.Flexo2016-03-31-5/+25
|
* Add mute and unmute commands.Flexo2016-03-31-0/+13
|
* Honour twitter's mutes and "hide retweets from this user" settings.Flexo2016-03-23-0/+129
|
* twitter: Fix some nitpicky issues reported by coveritydequis2015-10-08-12/+15
| | | | | | Mostly minor rare leaks that happen in error conditions, and one dereference before null check in twitter_logout (the null check is probably the wrong one there, but it doesn't hurt to keep it)
* twitter: show full url in the url command, with usernamedequis2015-06-08-0/+39
| | | | | | | By asking the server for the username. Storing the username somewhere would have made sense, but this command isn't going to be used very often, so, whatever.
* Make replies to self work in Twitter.Wilmer van der Gaast2015-05-03-0/+2
| | | | | Difficult because there's no bee_user struct pointing at the user themselves so instead just fake one for very limited use.
* Parsing of "retweets with comment". Not documented by Twitter so good luck.Wilmer van der Gaast2015-05-03-17/+37
| | | | Also, fix bug in parsing of entities in DMs.
* twitter: fix _last_tweet setting, which broke during a mergedequis2015-03-13-1/+1
| | | | | | Commit eb4ad8d (a merge commit, yes) changed it to _last_tweet and missed one of the three. Not entirely sure if wilmer's fault, could be mine when I did the merge of his merge on my side. Whatever.
* Various user experience/error reporting improvementsdequis2015-03-10-0/+3
| | | | | | | | | | | - Show version as part of the initial message of &bitlbee - Use g_strerror() to show actual errors when saving xml configs - Only show "The nick is (probably) not registered" for ENOENT, use g_strerror() for the rest of OS errors when loading xml configs - Show "Protocol not found: <name>" when find_protocol() returns null, useful when the user uninstalls a plugin accidentally. - Suggest the user to check the system clock when getting error 401 from the twitter stream (other REST endpoints show a better error message)
* Reindent everything to K&R style with tabsIndent2015-02-20-170/+251
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* Revert "Twitter format strings"dequis2015-02-20-48/+15
| | | | | | This reverts commit ce402b20d82ec323e6bd5e306de934773590742d. See discussion in PR #10 for more details.
* Twitter format stringsWilliam Pettersson2015-01-26-15/+48
| | | | | | | | | | | Allow users to specify how tweets should be displayed 3 new settings are available to set how tweets are displayed: - twitter_format_string for normal tweets - retweet_format_string for retweets - reply_format_string for replies For full documentation see the help files
* twitter: implemented filter based group chatsjgeboski2015-01-25-5/+221
| | | | | | | | | | | | | | | | | | | | | 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.
* twitter: minor cleanup, use G_G(U)INT64_FORMAT instead of castingdequis2015-01-16-11/+11
|
* twitter: start stream from last tweet on connect/reconnectroger2015-01-16-1/+6
| | | | | This works by setting the last_tweet hidden account setting to the ID of the last shown tweet.
* twitter: Use g_strcasecmp for screen_namedequis2014-11-24-4/+4
| | | | | | Fixes a few minor bugs with users who have uppercase characters in nicks (see trac ticket 1138). Most notably, the "follow" command showing no feedback that a user was followed
* Update json-parser code to git rev 11a80f389769d1f66ca7fbe64ad89c82d3ba4ba9.Wilmer van der Gaast2014-02-13-4/+4
| | | | | | Few BitlBee-specific diffs now. Annoyingly need to link to libm now for the use of the function pow() since the lib now does its own number parsing...
* Fix cleanup failure on Twitter timeouts.Wilmer van der Gaast2013-06-16-1/+4
|
* Merging "storage" branch which I wrote long ago. It separates generation ofWilmer van der Gaast2013-04-20-8/+0
|\ | | | | | | | | | | XML-formatted user configs from disk I/O so we can try to start using other mechanisms to store them (a REST API or something, for example).
| * Remove two hacks for some glib<2.14 versions that are no longer supported.Wilmer van der Gaast2012-06-04-8/+0
| |
* | I'm still bored on a long flight. Wrote a script to automatically updateWilmer van der Gaast2013-02-21-1/+1
| | | | | | | | | | | | | | my copyright mentions since some were getting pretty stale. Left files not touched since before 2012 alone so that this change doesn't touch almost EVERY source file.
* | Fixed Twitter favourite command. Its syntax was silently changed in the 1.1Wilmer van der Gaast2013-01-14-6/+8
| | | | | | | | | | API. A full list of diffs would be helpful, guys...
* | I suck. This will teach me not to combine logging and actual work in sillyWilmer van der Gaast2012-12-25-1/+1
| | | | | | | | | | ways.
* | Whoops, remove those debugging printfs as I intended to do before merging.Wilmer van der Gaast2012-12-24-9/+1
| |
* | For finding since_id, don't use RT original IDs of course. :-/ This fixesWilmer van der Gaast2012-12-21-4/+3
| | | | | | | | | | duplicate-tweet issues in non-streaming mode.
* | Don't hide own tweets in streaming mode with fetch_mentions off, and moveWilmer van der Gaast2012-12-03-4/+5
| | | | | | | | | | txs_free() to the right place - fixes a memory leak.
* | Have root confirm some commands that so far gave no feedback at all, sinceWilmer van der Gaast2012-11-25-5/+11
| | | | | | | | | | "no news is good news" can be a little confusing.
* | Only a few commands use twitter_message_id_from_command_arg(), others wereWilmer van der Gaast2012-11-25-2/+11
| | | | | | | | | | still using a decimal scanf format string. Messy code duplication. :-(
* | Use hex for show_ids, but stick to the 2-char maximum. a 256-message backlogWilmer van der Gaast2012-11-25-2/+2
| | | | | | | | | | really should be enough.
* | Fixed one potential memory leak, and re-remembered that for GLib + valgrindWilmer van der Gaast2012-11-25-1/+0
| | | | | | | | | | you REALLY need to set G_SLICE=always-malloc. Argh!
* | Finally cleaned up the show-tweet functions.Wilmer van der Gaast2012-11-25-77/+68
| |
* | Fixing two oopses from my last commit.Wilmer van der Gaast2012-11-25-1/+2
| |
* | Changed mode/room management a little bit.Wilmer van der Gaast2012-11-25-46/+10
| |
* | s/twitter_msg/twitter_log/ and use it in a few more places.Wilmer van der Gaast2012-11-25-2/+2
| |
* | Show DMs the right way. With mode=many and show_ids=off they'll look justWilmer van der Gaast2012-11-25-6/+12
| | | | | | | | | | | | like tweets but that's what you get with bad settings.. Also, don't show DMs from ourselves.
* | Minor rework: Always fill td->log now and use it not just for show_ids, butWilmer van der Gaast2012-11-25-47/+84
| | | | | | | | | | | | | | | | | | | | also for stream deduplication. Also, drop tweets from unknown people unless fetch_mentions is set. The stream will feed us that spam either way but not everyone wants to see it. Last, fixing a bug where in streaming mode, per-user last tweet times were no longer getting tracked.
* | Fixing one obvious memory leak.Wilmer van der Gaast2012-11-24-0/+2
| |
* | Some code for handling disconnect/event messages.Wilmer van der Gaast2012-11-20-0/+41
| |
* | Decode incoming DMs.Wilmer van der Gaast2012-11-12-25/+76
| |
* | Extend keepalive code to time out connections when pings don't getWilmer van der Gaast2012-11-11-0/+1
| | | | | | | | | | acknowledged, using this for Twitter streams and MSN so far.