Changeset 3b8e4be6


Ignore:
Timestamp:
2017-01-03T06:30:38Z (2 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
683e4e0
Parents:
188b75e
Message:

purple: show self-messages in groupchat backlogs (before join)

That is, flagged with PURPLE_MESSAGE_DELAYED. Those are safe to display.

This is similar to what adium does. Thanks EionRobb for the idea.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    r188b75e r3b8e4be6  
    11971197}
    11981198
    1199 /* Handles write_im and write_chat. Removes echoes of locally sent messages */
     1199/* Handles write_im and write_chat. Removes echoes of locally sent messages.
     1200 *
     1201 * PURPLE_MESSAGE_DELAYED is used for chat backlogs - if a message has both
     1202 * that flag and _SEND, it's a self-message from before joining the channel.
     1203 * Those are safe to display. The rest (with just _SEND) may be echoes. */
    12001204static void prplcb_conv_msg(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
    12011205{
    1202         if (!(flags & PURPLE_MESSAGE_SEND)) {
    1203                 handle_conv_msg(conv, who, message, 0, mtime);
     1206        if ((!(flags & PURPLE_MESSAGE_SEND)) || (flags & PURPLE_MESSAGE_DELAYED)) {
     1207                handle_conv_msg(conv, who, message, (flags & PURPLE_MESSAGE_SEND) ? OPT_SELFMESSAGE : 0, mtime);
    12041208        }
    12051209}
Note: See TracChangeset for help on using the changeset viewer.