/soc/2015/jgeboski/facebook: 72cb6af0a275: facebook-api: fix gro...
dequis
dx at dxzone.com.ar
Sun Sep 20 18:07:37 EDT 2015
Changeset: 72cb6af0a27586a918afd933c9226206c1fd90b1
Author: dequis <dx at dxzone.com.ar>
Date: 2015-09-15 21:40 -0300
Branch: facebook
URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/72cb6af0a275
Description:
facebook-api: fix groupchat self messages
By not swapping uid with oid, since the latter is always 0.
diffstat:
libpurple/protocols/facebook/api.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (33 lines):
diff --git a/libpurple/protocols/facebook/api.c b/libpurple/protocols/facebook/api.c
--- a/libpurple/protocols/facebook/api.c
+++ b/libpurple/protocols/facebook/api.c
@@ -1375,7 +1375,6 @@ fb_api_cb_publish_ms(FbApi *api, GByteAr
FbApiPrivate *priv = api->priv;
FbId id;
FbId oid;
- FbId uid;
FbJsonValues *values;
FbThrift *thft;
gchar *stoken;
@@ -1450,15 +1449,16 @@ fb_api_cb_publish_ms(FbApi *api, GByteAr
}
fb_api_message_reset(&msg, FALSE);
- uid = fb_json_values_next_int(values, 0);
+ msg.uid = fb_json_values_next_int(values, 0);
oid = fb_json_values_next_int(values, 0);
msg.tid = fb_json_values_next_int(values, 0);
- if (uid == priv->uid) {
+ if (msg.uid == priv->uid) {
msg.flags |= FB_API_MESSAGE_FLAG_SELF;
- msg.uid = oid;
- } else {
- msg.uid = uid;
+
+ if (msg.tid == 0) {
+ msg.uid = oid;
+ }
}
if (msg.uid == 0) {
More information about the Commits
mailing list