Transform incoming slack call URLs
See: https://github.com/dylex/slack-libpurple/issues/166
This commit is contained in:
parent
30b62d5196
commit
78137b34d9
22
overlays/purple-slack/call-transformation.patch
Normal file
22
overlays/purple-slack/call-transformation.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
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);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
|
@ -11,6 +11,7 @@ self: super: {
|
|||
|
||||
patches = (old.patches or []) ++ [
|
||||
./browser-based-auth.patch
|
||||
./call-transformation.patch
|
||||
];
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue