mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Remove newlines from group IDs
This commit is contained in:
@@ -73,7 +73,7 @@ exports.redactGroupIds = text => {
|
||||
return text.replace(
|
||||
GROUP_ID_PATTERN,
|
||||
(match, before, id, after) =>
|
||||
`${before}${REDACTION_PLACEHOLDER}${id.slice(-3)}${after}`
|
||||
`${before}${REDACTION_PLACEHOLDER}${removeNewlines(id).slice(-3)}${after}`
|
||||
);
|
||||
};
|
||||
|
||||
@@ -86,3 +86,5 @@ exports.redactAll = compose(
|
||||
exports.redactGroupIds,
|
||||
exports.redactPhoneNumbers
|
||||
);
|
||||
|
||||
const removeNewlines = text => text.replace(/\r?\n|\r/g, '');
|
||||
|
||||
Reference in New Issue
Block a user