Closed Bug 953749 Opened 10 years ago Closed 10 years ago

Emoticons are not displayed when a message is displayed several times

Categories

(Instantbird Graveyard :: Conversation, defect)

x86
Other
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florian, Assigned: florian)

References

Details

*** Original post on bio 306 at 2010-01-19 17:41:00 UTC ***

This is only a minor bug because there's not current usecase, but add-on authors may hit it.

The design of purpleIMessage with the message and originalMessage is somewhat stupid. When a message is displayed into a conversation, it's processed through the filters (that removed unwanted content) and then through text modifiers (emoticons, links, ...), and finally through the message theme system.

When a message goes several times through this process to be displayed by several convbrowser bindings, the filters remove <img> tags added by the emoticon system.

Possible solution:
 - tweak the filtering so that <img> tags are replaced by the content of their alt attributes
 - change purpleMessage so that intermediate steps can be kept and displaying several time the same messages doesn't make it go through the process several times. This is an optimization, but it may not be that great if ones start to think about redisplaying the conversation with different filtering settings and different emoticons and message themes.
 - maybe the convbrowser should only use the originalMessage and give up on using the "message" attribute of purpleIMessage.
  In this case, how can add-ons modify on-the-fly the received messages before they are displayed?
*** Original post on bio 306 at 2011-08-26 01:19:08 UTC ***

(In reply to comment #0)
> This is only a minor bug because there's not current usecase, but add-on
> authors may hit it.

It became visible with the landing of the "Hidden Conversation" stuff (https://hg.instantbird.org/instantbird/rev/9b7d6d806438 for the initial landing, bug 954412 (bio 978) for tracking the follow-ups).

>  - maybe the convbrowser should only use the originalMessage and give up on
> using the "message" attribute of purpleIMessage.

Fixed using this approach in https://hg.instantbird.org/instantbird/rev/3cafae7e8a64

>   In this case, how can add-ons modify on-the-fly the received messages before
> they are displayed?

This is covered by bug 954127 (bio 692).
Assignee: nobody → florian
Blocks: 954412
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.1
You need to log in before you can comment on or make changes to this bug.