[packages/libpurple-protocol-skypeweb] upstream patch to fix img urls in bitlbee; rel 3
atler
atler at pld-linux.org
Sun Jan 24 21:57:38 CET 2021
commit 015c36ed7cf3e79dae73828141dd4811f10c3a83
Author: Jan Palus <atler at pld-linux.org>
Date: Sun Jan 24 21:56:22 2021 +0100
upstream patch to fix img urls in bitlbee; rel 3
bitlbee_img_url.patch | 42 ++++++++++++++++++++++++++++++++++++++++
libpurple-protocol-skypeweb.spec | 4 +++-
2 files changed, 45 insertions(+), 1 deletion(-)
---
diff --git a/libpurple-protocol-skypeweb.spec b/libpurple-protocol-skypeweb.spec
index c2deeb1..52b622b 100644
--- a/libpurple-protocol-skypeweb.spec
+++ b/libpurple-protocol-skypeweb.spec
@@ -1,12 +1,13 @@
Summary: SkypeWeb API Plugin for Pidgin/libpurple/Adium
Name: libpurple-protocol-skypeweb
Version: 1.7
-Release: 2
+Release: 3
License: GPL v3
Group: Applications/Communications
Source0: https://github.com/EionRobb/skype4pidgin/archive/%{version}.tar.gz
# Source0-md5: 6af9359c55f4644fc8848389df582848
Patch0: login.patch
+Patch1: bitlbee_img_url.patch
URL: https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb
BuildRequires: cmake >= 2.8
BuildRequires: glib2-devel
@@ -23,6 +24,7 @@ and chat with all your Skype buddies from within Pidgin/Adium.
%prep
%setup -qn skype4pidgin-%{version}
%patch0 -p1
+%patch1 -p1
%build
cd skypeweb
diff --git a/bitlbee_img_url.patch b/bitlbee_img_url.patch
new file mode 100644
index 0000000..ee6dd4a
--- /dev/null
+++ b/bitlbee_img_url.patch
@@ -0,0 +1,42 @@
+From 130ab8ffac2606180cf4ebf62dde46a953fbf765 Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus at fastmail.com>
+Date: Sun, 24 Jan 2021 19:09:47 +0100
+Subject: [PATCH] Switch BitlBee image message from system to normal IM/Chat
+
+---
+ skypeweb/skypeweb_contacts.c | 15 ++++++---------
+ 1 file changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/skypeweb/skypeweb_contacts.c b/skypeweb/skypeweb_contacts.c
+index f1f1671..35dddc9 100644
+--- a/skypeweb/skypeweb_contacts.c
++++ b/skypeweb/skypeweb_contacts.c
+@@ -26,14 +26,6 @@
+ #include "xfer.h"
+ #include "image-store.h"
+
+-static void purple_conversation_write_system_message_ts(
+- PurpleConversation *conv, const gchar *msg, PurpleMessageFlags flags,
+- time_t ts) {
+- PurpleMessage *pmsg = purple_message_new_system(msg, flags);
+- purple_message_set_time(pmsg, ts);
+- purple_conversation_write_message(conv, pmsg);
+- purple_message_destroy(pmsg);
+-}
+ static void purple_conversation_write_img_message(
+ PurpleConversation *conv, const char* who, const gchar *msg,
+ PurpleMessageFlags flags, time_t ts) {
+@@ -198,7 +190,12 @@ skypeweb_download_uri_to_conv(SkypeWebAccount *sa, const gchar *uri, PurpleConve
+ // Bitlbee doesn't support images, so just plop a url to the image instead
+
+ url = purple_strreplace(uri, "imgt1", "imgpsh_fullsize");
+- purple_conversation_write_system_message_ts(conv, url, PURPLE_MESSAGE_SYSTEM, ts);
++ if (PURPLE_IS_IM_CONVERSATION(conv)) {
++ purple_serv_got_im(sa->pc, from, url, PURPLE_MESSAGE_RECV, ts);
++ } else if (PURPLE_IS_CHAT_CONVERSATION(conv)) {
++ gchar *chatname = purple_conversation_get_data(conv, "chatname");
++ purple_serv_got_chat_in(sa->pc, g_str_hash(chatname), from, PURPLE_MESSAGE_RECV, url, ts);
++ }
+ g_free(url);
+
+ return;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libpurple-protocol-skypeweb.git/commitdiff/015c36ed7cf3e79dae73828141dd4811f10c3a83
More information about the pld-cvs-commit
mailing list