about summary refs log tree commit diff
path: root/pkgs/applications/networking/irc/weechat/scripts/wee-slack/load_weemoji_path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/irc/weechat/scripts/wee-slack/load_weemoji_path.patch')
-rw-r--r--pkgs/applications/networking/irc/weechat/scripts/wee-slack/load_weemoji_path.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/load_weemoji_path.patch b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/load_weemoji_path.patch
new file mode 100644
index 0000000000000..1e97dc32fa65f
--- /dev/null
+++ b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/load_weemoji_path.patch
@@ -0,0 +1,25 @@
+diff --git a/wee_slack.py b/wee_slack.py
+index e4716b4..ffd122d 100644
+--- a/wee_slack.py
++++ b/wee_slack.py
+@@ -6092,19 +6092,7 @@ def create_slack_debug_buffer():
+ 
+ def load_emoji():
+     try:
+-        weechat_dir = w.info_get("weechat_data_dir", "") or w.info_get(
+-            "weechat_dir", ""
+-        )
+-        weechat_sharedir = w.info_get("weechat_sharedir", "")
+-        local_weemoji, global_weemoji = (
+-            "{}/weemoji.json".format(path) for path in (weechat_dir, weechat_sharedir)
+-        )
+-        path = (
+-            global_weemoji
+-            if os.path.exists(global_weemoji) and not os.path.exists(local_weemoji)
+-            else local_weemoji
+-        )
+-        with open(path, "r") as ef:
++        with open("@out@/share/wee-slack/weemoji.json", "r") as ef:
+             emojis = json.loads(ef.read())
+             if "emoji" in emojis:
+                 print_error(