summaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--format.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/format.c b/format.c
index b3764ef..2f30a0d 100644
--- a/format.c
+++ b/format.c
@@ -160,18 +160,6 @@ static xs_str *format_line(const char *line, xs_list **attach)
160 xs *link = xs_fmt("<a href=\"%s\">%s</a>", url, name); 160 xs *link = xs_fmt("<a href=\"%s\">%s</a>", url, name);
161 161
162 s = xs_str_cat(s, link); 162 s = xs_str_cat(s, link);
163
164 if (attach) {
165 /* also add the link as an attachment */
166 xs *d = xs_dict_new();
167
168 d = xs_dict_append(d, "mediaType", "text/html");
169 d = xs_dict_append(d, "url", url);
170 d = xs_dict_append(d, "name", name);
171 d = xs_dict_append(d, "type", "Link");
172
173 *attach = xs_list_append(*attach, d);
174 }
175 } 163 }
176 else 164 else
177 s = xs_str_cat(s, v); 165 s = xs_str_cat(s, v);
@@ -255,18 +243,6 @@ static xs_str *format_line(const char *line, xs_list **attach)
255 else { 243 else {
256 xs *s1 = xs_fmt("<a href=\"%s\" target=\"_blank\">%s</a>", v2, u); 244 xs *s1 = xs_fmt("<a href=\"%s\" target=\"_blank\">%s</a>", v2, u);
257 s = xs_str_cat(s, s1); 245 s = xs_str_cat(s, s1);
258
259 if (attach) {
260 /* also add the link as an attachment */
261 xs *d = xs_dict_new();
262
263 d = xs_dict_append(d, "mediaType", "text/html");
264 d = xs_dict_append(d, "url", v2);
265 d = xs_dict_append(d, "name", "");
266 d = xs_dict_append(d, "type", "Link");
267
268 *attach = xs_list_append(*attach, d);
269 }
270 } 246 }
271 } 247 }
272 else 248 else