Start urlopen feature

Start https://github.com/profanity-im/profanity/issues/1340
This commit is contained in:
Michael Vetter
2020-05-16 21:52:30 +02:00
parent 7d7f0ef5a5
commit 083bf34a77
3 changed files with 39 additions and 0 deletions

View File

@@ -162,6 +162,21 @@ buffer_get_entry_by_id(ProfBuff buffer, const char *const id)
return NULL;
}
ProfBuffEntry*
buffer_get_url(ProfBuff buffer, const char *const id)
{
GSList *entries = buffer->entries;
while (entries) {
ProfBuffEntry *entry = entries->data;
if (strstr(entry->message, "http://")) {
return entry;
}
entries = g_slist_next(entries);
}
return NULL;
}
static void
_free_entry(ProfBuffEntry *entry)
{