Merge pull request #1145 from AStove/FixColorsInBuffers

Downgrade rich text for buffers
codeql
Lorenz Hübschle-Schneider 5 years ago committed by GitHub
commit 3f393a62ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      js/models.js

@ -18,6 +18,10 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
this.outgoingQueries = [];
var parseRichText = function(text) {
if(!text) {
return [{text}];
}
var textElements = weeChat.Protocol.rawText2Rich(text),
typeToClassPrefixFg = {
'option': 'cof-',
@ -64,8 +68,8 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
*/
this.Buffer = function(message) {
// weechat properties
var fullName = message.full_name;
var shortName = message.short_name;
var fullName = parseRichText(message.full_name)[0].text;
var shortName = parseRichText(message.short_name)[0].text;
var hidden = message.hidden;
// If it's a channel, trim away the prefix (#, &, or +). If that is empty and the buffer
// has a short name, use a space (because the prefix will be displayed separately, and we don't want

Loading…
Cancel
Save