Open
Bug 1209854
Opened 9 years ago
Updated 1 year ago
Display chat messages which contain images/videos
Categories
(Chat Core :: General, enhancement)
Chat Core
General
Tracking
(Not tracked)
NEW
People
(Reporter: Mook, Unassigned)
References
(Blocks 1 open bug, )
Details
It looks like nobody is paying attention to prplIMessage.containsImages.
I'd like to implement a chat protocol which can have image attachments. There's currently no way, as far as I can tell, to show images inline.
This might involve some work in each message theme :(
Comment 1•9 years ago
|
||
You can show images inline, and here's how (though this is merely a workaround and by no means a fix for the general issue):
You need to allow img tags in messages:
> // Call to createDerivedRuleset so the global ruleset gets inited
> createDerivedRuleset();
> // Allow images in IM messages
> addGlobalAllowedTag("img");
> addGlobalAllowedAttribute("src");
And then you just insert <img> tags into the displayMessage property of the imIMessage you get in prepareForDisplaying. You might also want to allow other attributes like "alt" or style rules like "vertical-align".
This will "compromise" all chats from what I can tell, so it is by no means what I'd call safe.
Comment 2•9 years ago
|
||
What I forgot: the filter list modification methods are from resource:///modules/imContentSink.jsm. And here's a screenshot of images embedded in messages: http://i.imgur.com/DG27WwC.png
Comment 3•9 years ago
|
||
Mic had WIPs about this several years ago, maybe there's something attached to an old bug.
Martin, yes you want to do something to the filtering rules, but you certainly don't want to do it globally. Derived rulesets should let you allow a specific tag (and allow the src attribute specifically on that tag, and preferably with only some URL schemes) only on some conversations.
Comment 4•9 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #3)
> Mic had WIPs about this several years ago, maybe there's something attached
> to an old bug.
That was bug 955011, there's no code attached there...only mockups and screenshots.
Updated•2 years ago
|
Severity: normal → S3
Comment 5•1 year ago
|
||
Surprisingly the containsImage
flag still exists, although it is completely unused by both protocols and the UI.
With Matrix support this has probably become more important to consider. See bug 1739592.
Summary: Have some way of displaying messages which have images → Display chat messages which contain images/videos
You need to log in
before you can comment on or make changes to this bug.
Description
•