nixpkgs/overlays/purple-slack/call-transformation.patch

23 lines
522 B
Diff

diff --git a/slack-message.c b/slack-message.c
index de49fa6..f870a04 100644
--- a/slack-message.c
+++ b/slack-message.c
@@ -164,6 +164,17 @@ void slack_message_to_html(GString *html, SlackAccount *sa, gchar *s, PurpleMess
}
s = r+1;
}
+
+ if (strstr(html->str, "slack.com/call") != NULL) {
+ char find[200] = "";
+ strcat(find, sa->host);
+ strcat(find, "/call");
+
+ char replace[60] = "app.slack.com/free-willy/";
+ strcat(replace, sa->team.id);
+
+ g_string_replace(html, find, replace, 0);
+ }
}
/*