Skip to content

Commit

Permalink
imcb_add_buddy is slow, let's not
Browse files Browse the repository at this point in the history
This should improve sm00th#159, but is not a complete fix
  • Loading branch information
Alcaro authored Jun 5, 2018
1 parent 870ead9 commit 14ce432
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/discord-handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void discord_handle_user(struct im_connection *ic, json_value *uinfo,
bee_user_t *bu = bee_user_by_handle(ic->bee, ic, name);

if (bu == NULL) {
imcb_add_buddy(ic, name, NULL);
bu = bee_user_new(ic->bee, ic, name, 0);
if (set_getbool(&ic->acc->set, "never_offline") == TRUE) {
flags = BEE_USER_ONLINE | BEE_USER_AWAY;
if (set_getbool(&ic->acc->set, "friendship_mode") == FALSE) {
Expand All @@ -153,7 +153,6 @@ static void discord_handle_user(struct im_connection *ic, json_value *uinfo,
} else {
imcb_buddy_status(ic, name, 0, NULL, NULL);
}
bu = bee_user_by_handle(ic->bee, ic, name);
}

if (bu != NULL) {
Expand Down

0 comments on commit 14ce432

Please sign in to comment.