Changeset eb73d05


Ignore:
Timestamp:
2017-05-07T19:06:29Z (4 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
54b2a36
Parents:
17a58df
Message:

Fix status message being set to null accidentally

In other words, "account jabber set away Message" resulted in away
status being set, but not "Message".

Fixes trac ticket 1291

This was broken by ac68733ad7a5127395d6367b655a2d9de5d911b5 (3.4.2)

That commit added another call of imc_away_state_find() with the fixed
string "away", so purple protocols can become away by setting away to
any string. But by doing so, it wiped the status message because it's
the same as the name of the away state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r17a58df reb73d05  
    768768                msg = ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? away : NULL;
    769769                away = imc_away_state_find(m, away, &msg) ? :
    770                        (imc_away_state_find(m, "away", &msg) ? : m->data);
     770                       (imc_away_state_find(m, "away", NULL) ? : m->data);
    771771        } else if (ic->acc->flags & ACC_FLAG_STATUS_MESSAGE) {
    772772                away = NULL;
     
    802802                           contains no data unless it adds something to what
    803803                           we have in state already. */
    804                         if (strlen(m->data) == strlen(away)) {
     804                        if (message && strlen(m->data) == strlen(away)) {
    805805                                *message = NULL;
    806806                        }
     
    828828                        for (m = gcm; m; m = m->next) {
    829829                                if (g_strcasecmp(imc_away_alias_list[i][j], m->data) == 0) {
    830                                         if (!keep_message) {
     830                                        if (!keep_message && message) {
    831831                                                *message = NULL;
    832832                                        }
Note: See TracChangeset for help on using the changeset viewer.