Skip to content

Commit

Permalink
nogaim: Match case in imc_away_state_find()
Browse files Browse the repository at this point in the history
Match the provided away-state case when searching for an alias, better
matching expectations.

For example, bitlbee-discord provides this:
    m = g_list_prepend(m, "invisible");
    m = g_list_prepend(m, "dnd");
    m = g_list_prepend(m, "online");
    m = g_list_prepend(m, "idle");

/away DND - some reason
...gives "dnd", which matches what was given to Bitlbee.

/away Busy - some reason
...gives "DND", which does NOT match what was given to Bitlbee.  The
capitalization is derived from using Bitlbee's built-in alias list.

Technically this is a breaking behavior change to Bitlbee's plugin
API, even if this behavior may make more sense.

See sm00th/bitlbee-discord#230 (comment)
  • Loading branch information
digitalcircuit authored and dequis committed Jun 22, 2022
1 parent 2e5f594 commit b82ba4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/nogaim.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static char *imc_away_state_find(GList *gcm, char *away, char **message)
*message = NULL;
}

return imc_away_alias_list[i][j];
return m->data;
}
}
}
Expand Down

0 comments on commit b82ba4a

Please sign in to comment.