aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-api.c
Commit message (Collapse)AuthorAgeLines
* facebook-api: use the icon URL as a backup checksumjgeboski2016-01-16-2/+13
| | | | | | | There is a report of the 'oh' parameter missing from some of the icon images, which is used as the checksum. The solution is to simply use the URL itself as the checksum in the *rare* case the 'oh' parameter is missing.
* Updated copyright dates for 2016jgeboski2016-01-15-1/+1
|
* facebook-api: fixed incorrect handling of unknown XMA typesjgeboski2016-01-09-2/+2
| | | | | | This fixes an improper GError propagation, which not is only incorrect, but also has no effect. This ends up leading to the unsupported XMA message being ignored without any notice to the user.
* facebook-api: ignore messages which are sequentially duplicatedjgeboski2016-01-07-5/+17
| | | | | | | | | | | | | | | Sometimes Facebook will sent a batch of duplicated messages over the MQTT stream. There are occasions where Facebook will send duplicated messages which are not sequential, however, it does not occur at the rete of the sequential duplication. This is likely due to the fact that the plugin is using an older revision of the Messenger protocol. For now, we should attempt to ignore sequential duplicates from being from being display. This fix is not bullet proof, but it is simple, and should cut down on the duplicated message spam. The proper fix is likely going to be to update the plugin to use a more recent Messenger protocol revision.
* facebook-api: migrated key mappings to the GTK-Docjgeboski2016-01-04-82/+0
|
* facebook-api: attempt to silently reconnect the MQTT streamjgeboski2016-01-04-1/+15
| | | | | | | | | | | | | | Often times, the MQTT stream is disconnected by Facebook for whatever reason. The only thing I can think of is some sort of load balancing on Facebook's end. It has also been reported that when a user logs out on the Facebook website, their MQTT connections are killed. Whenever the connection is killed by Facebook, the user is able to reconnect right after. In order to make for a quieter experience, the plugin should attempt to silently reconnect before notifying the user of an error. This is done by relying on the sequence identifier and the message queue to ensure everything remains synchronized for when the connection returns.
* facebook-api: implemented queued message sendingjgeboski2016-01-04-25/+93
| | | | | | | | | | | This ensures a message is sent successfully before attempting to send another message. As a result, messages are sent in their proper order, instead of the order in which they arrive. This also introduces a check for the successful sending of a message, rather than silently failing. The queued sending also ensures messages are not lost when the state of visibility is being switched. This also allows the plugin to silently reconnect when a connection failure occurs.
* facebook-api: properly handle optional Thrift fields and scopingjgeboski2016-01-01-60/+86
| | | | | | | | | | | | | | The plugin is required to read Thrift data for the presence states of contacts. The data which is being read has some optional fields, which are rarely not supplied. This has led to this bug being undiscovered for quite some time. Not only was the plugin not properly accounting for optional fields, but also did not account for field scoping. This is not really an issue until a Thrift list is being read, which will cause the identifier to grow with each field read, rather than reset. The field identifier is only relevant to its local scope, nothing more. More importantly, the identifier must be reset with each iteration of a list.
* facebook-api: fixed the self contact being ignoredjgeboski2015-12-28-7/+12
| | | | This is a regression introduced by 00c0ae8.
* Preserve the timestamp on incoming messagesjgeboski2015-12-26-0/+7
|
* facebook: fixed broken contact counting with non-friendsjgeboski2015-12-25-2/+1
| | | | | | | | | | | | | | | | When fetching more than 500 contacts, multiple requests must be made in order avoid request limits. When friends are retrieved and processed, the plugin must keep a count of the processed contacts to know whether or not it needs to retrieve more contacts. Currently, this counter assumes every contact is a friend, which is not always the case. This counter needs to advance even when a contact is not a friend. This fixes the incomplete fetching of the buddy list when a user has over 500 friends. This is a regression introduced by 00c0ae8.
* Coding style consistenciesjgeboski2015-12-24-2/+2
|
* facebook-api: fixed faulty conditional with friend checkingjgeboski2015-12-22-1/+1
| | | | This regression was introduced by 00c0ae8.
* facebook-api: fixed non-friend contacts showing as buddiesjgeboski2015-12-20-0/+8
|
* facebook-util: refactored naming and GTK-Docjgeboski2015-12-20-7/+7
|
* facebook-util: use the GConverter interface instead of zlibjgeboski2015-12-20-8/+17
|
* facebook-api: fix groupchat self messagesdequis2015-09-20-6/+6
| | | | By not swapping uid with oid, since the latter is always 0.
* facebook-api: fixed deleted XMAs being fataljgeboski2015-08-26-3/+9
|
* facebook-api: fixed the contact query not fetching non-usersjgeboski2015-08-25-97/+61
|
* Implemented group chat topic change eventsjgeboski2015-08-25-7/+51
|
* facebook-api: fixed generic API operations always failingjgeboski2015-08-25-1/+5
|
* facebook-api: removed weird usage of g_slist_copy_deep()jgeboski2015-08-24-3/+8
|
* Imported changes from purple-facebookjgeboski2015-08-24-1022/+2563
|
* facebook-api: fixed JSON parse errors with messagesjgeboski2015-06-22-2/+9
| | | | | | | | It was assumed there was always a leading "NULL" byte prepended to each message. This is not the case, the NULL byte is actually a variable integer, which is the size for a Thrift string. In order to navigate directly the JSON data, just read the data as a thrift string in order to obtain the offset of the JSON data.
* Reset stoken when getting ERROR_QUEUE_NOT_FOUND, to create a new onedequis2015-04-03-1/+8
| | | | | | Simpler and more verbose version of my other patch which silently created a new queue - this will show up as a reconnection and should make it obvious if an infinite loop happens. jgeboski's idea, not mine.
* fb_api_cb_mqtt_publish: Show topic as part of the debug messagedequis2015-03-11-1/+1
|
* Updated copyright dates for 2015jgeboski2015-03-05-1/+1
|
* facebook-json: add fb_json_str_escape() to properly escape messagesdequis2015-03-01-1/+6
| | | | | | | | Fixes issues such as losing messages that include a quote character. Only escapes the minimum needed to work - control characters, backslashes and quotes. UTF-8 chars are still valid json, so they are sent as-is.
* Revert "Implemented message sending queue"jgeboski2015-01-30-44/+1
| | | | | | | | This reverts 68c46dd. While the sending queue attempted to ensure each message was sent in order, it also lead to a significant delay in the sending of messages. This is due in part to Facebook taking upwards of a minute or more to reply to a message being sent. Moreover, the queue is not really needed unless messages are being spammed.
* facebook-api: fixed invalid GSList usagejgeboski2015-01-30-7/+7
|
* Check format string security at compile-timejgeboski2015-01-27-2/+2
| | | | | This enables various format string security checks by the compiler in attempt to avoid run-time failures.
* facebook-api: removed unused topic subscriptionsjgeboski2015-01-23-10/+9
| | | | | | | | | This removes certain topic subscriptions which are of no importance to this plugin. This results in the usage of slightly less bandwidth. This also forcibly unsubscribes from the message notifications topic, which seems to cause the connection to die out randomly when messages are sent.
* Unconstify all GSListsjgeboski2015-01-17-1/+1
|
* Implemented group chatsjgeboski2015-01-16-8/+435
|
* Improved handling of JSON and HTTP errorsjgeboski2015-01-16-31/+60
|
* Migrated to numeric facebook user identifiersjgeboski2015-01-15-189/+48
|
* Implemented typing notificationsjgeboski2015-01-15-1/+97
|
* Implemented message sending queuejgeboski2015-01-14-3/+47
|
* Implemented presence states of contactsjgeboski2015-01-14-0/+122
|
* Implemented one-on-one messagingjgeboski2015-01-14-134/+416
|
* Implemented contacts list lookupjgeboski2015-01-14-0/+131
|
* Implemented initial MQTT interfacejgeboski2015-01-14-2/+183
|
* Implemented user authenticationjgeboski2015-01-03-0/+294