Ignore:
Timestamp:
2018-03-10T11:30:39Z (7 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
5447c59
Parents:
3f44e43 (diff), 4a9c6b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    r3f44e43 r7a9d968  
    167167        jabber_buddy_remove_bare(c->ic, jc->name);
    168168
     169        g_free(jc->last_sent_message);
    169170        g_free(jc->my_full_jid);
    170171        g_free(jc->name);
     
    187188
    188189        jabber_cache_add(ic, node, jabber_chat_self_message);
     190
     191        g_free(jc->last_sent_message);
     192        jc->last_sent_message = g_strdup(message);
    189193
    190194        return !jabber_write_packet(ic, node);
     
    325329                        }
    326330                        bud->flags |= JBFLAG_IS_ANONYMOUS;
     331                } else if (bud == jc->me) {
     332                        g_free(bud->ext_jid);
     333                        bud->ext_jid = g_strdup(jd->me);
    327334                }
    328335
     
    347354                }
    348355
     356                imcb_chat_add_buddy(chat, bud->ext_jid);
     357
    349358                if (bud != jc->me && (jc->flags & JCFLAG_ALWAYS_USE_NICKS) && !(bud->flags & JBFLAG_IS_ANONYMOUS)) {
    350359                        imcb_buddy_nick_change(ic, bud->ext_jid, bud->resource);
    351360                }
    352361
    353                 imcb_chat_add_buddy(chat, bud->ext_jid);
    354362                if (s) {
    355363                        *s = '/';
     
    494502                imcb_chat_log(chat, "From conference server: %s", body->text);
    495503                return;
    496         } else if (jc && jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me &&
    497                    (jabber_cache_handle_packet(ic, node) == XT_ABORT)) {
    498                 /* Self message marked by this bitlbee, don't show it */
    499                 return;
     504        } else if (jc && jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me) {
     505                if (jabber_cache_handle_packet(ic, node) == XT_ABORT) {
     506                        /* Self message marked by this bitlbee, don't show it */
     507                        return;
     508                } else if (xt_find_attr(node, "id") == NULL &&
     509                           g_strcmp0(body->text, jc->last_sent_message) == 0) {
     510                        /* Some misbehaving servers (like slack) eat the ids and echo anyway.
     511                         * Try to detect those cases by comparing against the last sent message. */
     512                        return;
     513                }
    500514        }
    501515
Note: See TracChangeset for help on using the changeset viewer.