mirror of
https://git.sr.ht/~emerson/reflectionircd
synced 2025-04-13 09:59:52 +00:00
fix multiline topics
This commit is contained in:
parent
2c381a414d
commit
394a22738e
2 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ export class Channel {
|
|||
const topicText = response.data["topic"];
|
||||
if (!topicText || this.topic.get("text") !== "")
|
||||
return;
|
||||
this.topic.set("text", topicText);
|
||||
this.topic.set("text", topicText.replace(/\r\n|\r|\n/g, " "));
|
||||
this.topic.set("timestamp", Date.now().toString(10).substring(0, 10));
|
||||
this.topic.set('setter', "matrix");
|
||||
}).catch(e => {
|
||||
|
|
|
@ -529,7 +529,7 @@ export class Server {
|
|||
return;
|
||||
const topicSetter = this.getOrCreateMatrixUser(event["sender"]);
|
||||
const topicTS: string = event["origin_server_ts"].toString();
|
||||
targetChannel.topic.set("text", topicText);
|
||||
targetChannel.topic.set("text", topicText.replace(/\r\n|\r|\n/, " "));
|
||||
targetChannel.topic.set("timestamp", topicTS.substring(0,10))
|
||||
targetChannel.topic.set('setter', topicSetter.nick);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue