Fix channel name issue (#7153)

This commit is contained in:
saltrafael 2021-09-22 12:28:32 -03:00 committed by GitHub
parent 8a277e767a
commit de6eb99d41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,11 @@ export default function Notification(props: Props) {
urlParams.append('lc', notification_parameters.dynamic.hash);
}
let channelName = channelUrl && '@' + channelUrl.split('@')[1].split('#')[0];
let channelName;
try {
const { claimName } = parseURI(channelUrl);
channelName = claimName;
} catch (e) {}
const notificationTitle = notification_parameters.device.title;
const titleSplit = notificationTitle.split(' ');