event deletion can now be done with predix-id too

This commit is contained in:
Vishal
2022-09-03 08:56:10 +05:30
parent d5b6c31a61
commit e21cf63d49
2 changed files with 26 additions and 4 deletions

View File

@@ -1185,6 +1185,22 @@ class Store {
});
return deletedEventIds;
} // end processDeleteEvents
Set<String> getEventEidFromPrefix(String eventId) {
if( eventId.length > 64) {
return {};
}
Set<String> foundEventIds = {};
for( String k in allChildEventsMap.keys) {
if( k.length >= eventId.length && k.substring(0, eventId.length) == eventId) {
foundEventIds.add(k);
}
}
return foundEventIds;
}
} // end Store
void addMessageToChannel(String channelId, String messageId, Map<String, Tree> tempChildEventsMap, var chatRooms) {