Explorar el Código

Fix bug with pm or channel messages with no space

tags/v0.4.3^2
Vildravn hace 4 años
padre
commit
479413010d
Se han modificado 1 ficheros con 11 adiciones y 2 borrados
  1. +11
    -2
      src/client/ui/templates/messages/messages.js

+ 11
- 2
src/client/ui/templates/messages/messages.js Ver fichero

@@ -421,11 +421,20 @@ define([
const firstChar = val[0];
this.lastChannel = ({
[firstChar]: null,
'@': val.substr(0, val.indexOf(' ')) + ' ',
'$': val.substr(0, val.indexOf(' ')) + ' ',
'@': val.substr(0, val.indexOf(' ')),
'$': val.substr(0, val.indexOf(' ')),
'%': '%'
})[firstChar];

// hacky: fix bug with messages with no space, e.g.
// $channel
// @name
if (this.lastChannel != null && this.lastChannel.length > 0) {
this.lastChannel += ' ';
}

console.log(`-${this.lastChannel}-`);

client.request({
cpn: 'social',
method: 'chat',


Cargando…
Cancelar
Guardar