For some reason discord leaves read_state data about channels that no longer
exist in initial datastructure you get on connect. Trying to fetch backlog
messages from those channels resulted in a segfault, now those are ignored.
Unlike suffix mentions, where a user can change the trigger character, prefix
character is immutable and is hardcoded to "@", this is to mimic discords
behaviour.
If channel topic is "", do not overwrite default bitlbee's topic which has
namehint in it (currently in "Server/channel" format, and might help
distinguish between channels with similar names.
Instead of relying on bitlbee to do this bitlbee-discord will now canonize (or
try to) nicknames itself. This fixes outgoing mentions for nicknames with
spaces.
Previously I just assumed that the path in gateway url will always be "/" and
that it will always use secure connection. Latest discord changes proved me
wrong. Properly parsing the url now.
This commit adds automatic conversion of outgoing messages from irc-style
highlighting (e.g. "nick:") to discord's "<@id>" format. New "mention_suffix"
option is added.
Outgoing mentions currently won't work with names containing spaces.
Fixes: issue #9.
Finally define specific versions in dependencies and switch to autotools
buildsystem. Hopefully this will give us better portability and won't induce
major headaches.
Commit 4ab2b5a broke outgoing non-ascii messages by escaping every utf8 char.
So far we only needed to escape '"' char, so switch to regex approach instead
of using g_strescape().
Discord provides additional info about posted urls such as title and
description. Print this info into channel through a special handle that can be
adjusted via urlinfo_handle per-acc option.
Display message updates for edited messages. This commit also introduces
"edit_prefix" per-acc option that enables the user to customise the string that
will be prefixed to the edited message.
Do not traverse the lists by hand, use get_*_by_id functions from discord-util.
This adds get_user_by_id and changes get_channel_by_id to traverse all servers
in case no server is specified.
Get info and keep it in server_info channel list about voice channels. This
might later be used to somehow (imcb_log or nick changes) indicate buddies
being in voice channels (specific or in general).
libwebsockets recently changed one of the structure's names from
libwebsockets_pollargs to lws_pollargs. Updating so that bitlbee-discord builds
with libwebsockets version from git.
This fixes issue #3 from github.
When someone is mentioned discords replaces user's nickname with "<@[id]>" in
'content' part of the message, it also adds all of the user info into
'mentions' array, so we have to reverse this process to provide human-readable
names in messages.
This fixes issue#2 from github.
Calling imc_logout inside protocol callback results in ws context being
released which confuses libwebsockets which is still inside service routine and
leads to a segfault. Fix this by adding yet another state just to move
imc_logout call to lws_service_loop func.
Actually handle presences. Users will now only show up in channels if they are
actually online.
This commit also contains an accidental retab which renders it completely
unreadable, welp.