forwarder: strip " (Perigram)" suffix

* specific to my use case: the Telegram bridge at neo.angry.im creates
  users with " (Perigram)" suffix
master
Peter Cai 2 years ago
parent 0fc9fd0f8c
commit 21aa8de09a
  1. 7
      forwarder.js

@ -63,10 +63,11 @@ module.exports = class Forwarder {
}
stripMatrixName(name) {
if (name.length < 16) {
return name;
let _name = name.replace(" (Perigram)", "");
if (_name.length < 16) {
return _name;
} else {
return name.slice(0, 16);
return _name.slice(0, 16);
}
}

Loading…
Cancel
Save