forwarder: strip " (Perigram)" suffix
* specific to my use case: the Telegram bridge at neo.angry.im creates users with " (Perigram)" suffix
This commit is contained in:
parent
0fc9fd0f8c
commit
21aa8de09a
|
@ -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…
Reference in a new issue