FreeBSD Bugzilla – Attachment 250796 Details for
Bug 278263
net-im/tdlib-purple: add more "community" patches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch
tdlib-purple.patch (text/plain), 7.59 KB, created by
Mikhail T.
on 2024-05-18 18:12:05 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Mikhail T.
Created:
2024-05-18 18:12:05 UTC
Size:
7.59 KB
patch
obsolete
>diff --git a/net-im/tdlib-purple/Makefile b/net-im/tdlib-purple/Makefile >index 8643ac0b42d..43ed61ae96e 100644 >--- a/net-im/tdlib-purple/Makefile >+++ b/net-im/tdlib-purple/Makefile >@@ -4,8 +4,11 @@ DISTVERSION= 0.8.1 > PORTREVISION= 1 > CATEGORIES= net-im > >-PATCH_SITES= https://github.com/ars3niy/tdlib-purple/commit/ >-PATCHFILES+= 8c87b899ddbec32.patch:-p1 # https://github.com/ars3niy/tdlib-purple/pull/154 >+PATCH_SITES= https://github.com/ars3niy/tdlib-purple/pull/ >+PATCHFILES= 129.diff:-p1 \ >+ 154.diff:-p1 \ >+ 163.diff:-p1 >+DIST_SUBDIR= ${PORTNAME} > > MAINTAINER= ports@virtual-estates.net > COMMENT= Telegram plugin for libpurple, using tdlib >@@ -37,7 +40,7 @@ CMAKE_ON+= NoBundledLottie # Using graphics/rlottie > NLS_CMAKE_OFF+= -DNoTranslations=1 > NLS_USES= gettext-tools gettext-runtime > >-EXTRACT_AFTER_ARGS=--exclude rlottie --exclude fmt >+EXTRACT_AFTER_ARGS=--exclude rlottie --exclude fmt --exclude .github > > .include <bsd.port.options.mk> > >diff --git a/net-im/tdlib-purple/distinfo b/net-im/tdlib-purple/distinfo >index d8975e6dc44..c2357adc674 100644 >--- a/net-im/tdlib-purple/distinfo >+++ b/net-im/tdlib-purple/distinfo >@@ -1,5 +1,9 @@ >-TIMESTAMP = 1702875649 >-SHA256 (ars3niy-tdlib-purple-v0.8.1_GH0.tar.gz) = 8eb8b10c714368d7435d34ccda66a918e59c4cb4d2f49b6e16a246a78abd1a62 >-SIZE (ars3niy-tdlib-purple-v0.8.1_GH0.tar.gz) = 776564 >-SHA256 (8c87b899ddbec32.patch) = b6861f1129a8e17564c2f4abfc264fc95801ad22d00326c3c05d3003fd1b3832 >-SIZE (8c87b899ddbec32.patch) = 11742 >+TIMESTAMP = 1716045517 >+SHA256 (tdlib-purple/ars3niy-tdlib-purple-v0.8.1_GH0.tar.gz) = 8eb8b10c714368d7435d34ccda66a918e59c4cb4d2f49b6e16a246a78abd1a62 >+SIZE (tdlib-purple/ars3niy-tdlib-purple-v0.8.1_GH0.tar.gz) = 776564 >+SHA256 (tdlib-purple/129.diff) = 7dc6e4a2957a59ba9c97c3ba8ffb9e599ed4ebe39ac859ba127e4b79a38d1d2e >+SIZE (tdlib-purple/129.diff) = 4492 >+SHA256 (tdlib-purple/154.diff) = 95a6d82d796e41de97b5446963e1a747f0ff0f128b5e1d5a073140fe35dccea9 >+SIZE (tdlib-purple/154.diff) = 11297 >+SHA256 (tdlib-purple/163.diff) = 104dba0df7fc95bcd8a5a814033289676551cdcb88650047c7be881440a79dd4 >+SIZE (tdlib-purple/163.diff) = 1791 >diff --git a/net-im/tdlib-purple/files/patch-purple-info b/net-im/tdlib-purple/files/patch-purple-info >new file mode 100644 >index 00000000000..d7f4a08f907 >--- /dev/null >+++ b/net-im/tdlib-purple/files/patch-purple-info >@@ -0,0 +1,11 @@ >+--- purple-info.cpp 2021-12-17 04:50:38.000000000 -0500 >++++ purple-info.cpp 2024-02-13 18:24:00.349617000 -0500 >+@@ -149,5 +149,7 @@ >+ { >+ GHashTable *ui_info = purple_core_get_ui_info(); >+- const char *name = static_cast<char *>(g_hash_table_lookup(ui_info, "name")); >++ if (ui_info == NULL) >++ return ""; >++ const char *name = static_cast<const char *>(g_hash_table_lookup(ui_info, "name")); >+ return name ? name : ""; >+ } >diff --git a/net-im/tdlib-purple/files/patch-self-destructing-messages b/net-im/tdlib-purple/files/patch-self-destructing-messages >new file mode 100644 >index 00000000000..308cb868dc2 >--- /dev/null >+++ b/net-im/tdlib-purple/files/patch-self-destructing-messages >@@ -0,0 +1,80 @@ >+The material part of https://github.com/ars3niy/tdlib-purple/pull/159 -- with the >+default switched to TRUE (to show self-destruct messages out of the box). >+ >+ -mi >+--- purple-info.h >++++ purple-info.h >+@@ -40,6 +40,8 @@ namespace AccountOptions { >+ constexpr gboolean EnableSecretChatsDefault = TRUE; >+ constexpr const char *AnimatedStickers = "animated-stickers"; >+ constexpr gboolean AnimatedStickersDefault = TRUE; >++ constexpr const char *ShowSelfDestruct = "show-self-destruct"; >++ constexpr gboolean ShowSelfDestructDefault = TRUE; >+ constexpr const char *DownloadBehaviour = "download-behaviour"; >+ constexpr const char *DownloadBehaviourHyperlink = "hyperlink"; >+ constexpr const char *DownloadBehaviourStandard = "file-transfer"; >+--- receiving.cpp >++++ receiving.cpp >+@@ -634,22 +634,37 @@ void showMessage(const td::td_api::chat &chat, IncomingMessage &fullMessage, >+ messageInfo.repliedMessage = std::move(fullMessage.repliedMessage); >+ >+ if (message.ttl_ != 0) { >+- // TRANSLATOR: In-chat warning message >+- const char *text = _("Received self-destructing message, not displayed due to lack of support"); >+- std::string notice = makeNoticeWithSender(chat, messageInfo, text, account.purpleAccount); >+- showMessageText(account, chat, messageInfo, NULL, notice.c_str()); >+- return; >++ if (purple_account_get_bool(account.purpleAccount, AccountOptions::ShowSelfDestruct, AccountOptions::ShowSelfDestructDefault)) { >++ // TRANSLATOR: In-chat warning message >++ const char *text = _("Received self-destructing message, displaying anyway"); >++ std::string notice = makeNoticeWithSender(chat, messageInfo, text, account.purpleAccount); >++ showMessageText(account, chat, messageInfo, NULL, notice.c_str()); >++ } else { >++ // TRANSLATOR: In-chat warning message >++ const char *text = _("Received self-destructing message, not displayed due to lack of support"); >++ std::string notice = makeNoticeWithSender(chat, messageInfo, text, account.purpleAccount); >++ showMessageText(account, chat, messageInfo, NULL, notice.c_str()); >++ return; >++ } >+ } >+ >+ FileInfo fileInfo; >+ getFileFromMessage(fullMessage, fileInfo); >+ if (fileInfo.secret) { >+- // TRANSLATOR: In-chat warning message >+- std::string notice = formatMessage("Ignoring secret file ({})", fileInfo.description); >+- notice = makeNoticeWithSender(chat, messageInfo, notice.c_str(), account.purpleAccount); >+- showMessageText(account, chat, messageInfo, !fileInfo.caption.empty() ? fileInfo.caption.c_str() : nullptr, >+- notice.c_str()); >+- return; >++ if (purple_account_get_bool(account.purpleAccount, AccountOptions::ShowSelfDestruct, AccountOptions::ShowSelfDestructDefault)) { >++ // TRANSLATOR: In-chat warning message >++ std::string notice = formatMessage("Received secret file {}, displaying anyway", fileInfo.description); >++ notice = makeNoticeWithSender(chat, messageInfo, notice.c_str(), account.purpleAccount); >++ showMessageText(account, chat, messageInfo, !fileInfo.caption.empty() ? fileInfo.caption.c_str() : nullptr, >++ notice.c_str()); >++ } else { >++ // TRANSLATOR: In-chat warning message >++ std::string notice = formatMessage("Ignoring secret file ({})", fileInfo.description); >++ notice = makeNoticeWithSender(chat, messageInfo, notice.c_str(), account.purpleAccount); >++ showMessageText(account, chat, messageInfo, !fileInfo.caption.empty() ? fileInfo.caption.c_str() : nullptr, >++ notice.c_str()); >++ return; >++ } >+ } >+ >+ switch (message.content_->get_id()) { >+--- tdlib-purple.cpp >++++ tdlib-purple.cpp >+@@ -1020,6 +1020,11 @@ static void tgprpl_init (PurplePlugin *plugin) >+ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, opt); >+ #endif >+ >++ // TRANSLATOR: Account settings, key (boolean) >++ opt = purple_account_option_bool_new(_("Show self-destructing messages anyway"), AccountOptions::ShowSelfDestruct, >++ AccountOptions::ShowSelfDestructDefault); >++ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, opt); >++ >+ if (canDisableReadReceipts()) { >+ opt = purple_account_option_bool_new ("Send read receipts", >+ AccountOptions::ReadReceipts,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 278263
:
249838
|
249839
| 250796