fix for nip08 placeholder being accessed out of range

with a number like #[11]
This commit is contained in:
Vishal 2022-11-25 20:33:08 +05:30
parent 32bc7d2bc0
commit b2c16d3785

View File

@ -204,7 +204,7 @@ class EventData {
String eventId = tags[i][1];
// ignore this e tag if its mentioned in the body of the event
String placeholder = nip08PlaceHolders[i];
String placeholder = nip08PlaceHolders.length > i? nip08PlaceHolders[i]: "INVALIDPLACEHOLDER_SHOULDNOTEXIST";
if( content.contains(placeholder)) {
continue;
}