diff options
author | Daniel Kamil Kozar <dkk089@gmail.com> | 2017-07-19 15:35:33 +0300 |
---|---|---|
committer | Daniel Kamil Kozar <dkk089@gmail.com> | 2017-07-19 16:43:35 +0300 |
commit | 22433d97ea2ace62b9e479e3d931d6a4ebad9045 (patch) | |
tree | 969e55263b5e3399894bb5673298249319c5303a /skypeweb/skypeweb_messages.c | |
parent | 2ea69c79db8d74797a8178d70b41302cf46802d0 (diff) |
Use the correct timestamp for image messages
The current implementation completely disregards the "composetime" member of
the received message if its type is RichText/UriObject or
RichText/Media_FlikMsg.
This results in the system messages with links to the images, as well as the
images themselves having the timestamp of the message's reception by the
client instead of the time when the message was actually sent.
Diffstat (limited to 'skypeweb/skypeweb_messages.c')
-rw-r--r-- | skypeweb/skypeweb_messages.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/skypeweb/skypeweb_messages.c b/skypeweb/skypeweb_messages.c index 3d60fef..724a3d9 100644 --- a/skypeweb/skypeweb_messages.c +++ b/skypeweb/skypeweb_messages.c @@ -321,7 +321,7 @@ process_message_resource(SkypeWebAccount *sa, JsonObject *resource) PurpleXmlNode *blob = purple_xmlnode_from_str(content, -1);
const gchar *uri = purple_xmlnode_get_attrib(blob, "url_thumbnail");
- skypeweb_download_uri_to_conv(sa, uri, conv);
+ skypeweb_download_uri_to_conv(sa, uri, conv, composetimestamp);
purple_xmlnode_free(blob);
} else {
purple_debug_warning("skypeweb", "Unhandled thread message resource messagetype '%s'\n", messagetype);
@@ -408,7 +408,7 @@ process_message_resource(SkypeWebAccount *sa, JsonObject *resource) }
conv = PURPLE_CONVERSATION(imconv);
- skypeweb_download_uri_to_conv(sa, uri, conv);
+ skypeweb_download_uri_to_conv(sa, uri, conv, composetimestamp);
}
purple_xmlnode_free(blob);
} else if (g_str_equal(messagetype, "RichText/Media_GenericFile")) {
@@ -554,7 +554,7 @@ process_message_resource(SkypeWebAccount *sa, JsonObject *resource) conv = PURPLE_CONVERSATION(imconv);
- skypeweb_download_moji_to_conv(sa, text, url_thumbnail, conv);
+ skypeweb_download_moji_to_conv(sa, text, url_thumbnail, conv, composetimestamp);
const gchar *message = _("The user sent a Moji");
@@ -1650,4 +1650,4 @@ void skypeweb_gather_self_properties(SkypeWebAccount *sa)
{
skypeweb_post_or_get(sa, SKYPEWEB_METHOD_GET | SKYPEWEB_METHOD_SSL, sa->messages_host, "/v1/users/ME/properties", NULL, skypeweb_got_self_properties, NULL, TRUE);
-}
\ No newline at end of file +}
|