Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,12 @@ - (XMPPMessageArchiving_Message_CoreDataObject *)composingMessageWithJid:(XMPPJI

- (BOOL)messageContainsRelevantContent:(XMPPMessage *)message
{
// The underlying XML processing is thread safe for read access only: https://github.com/robbiehanson/KissXML/wiki/MemoryManagementThreadSafety
// XPath-based node lookup has to be performed on a copy as it requires temporary document assignment and therefore is not a strictly read operation
XMPPMessage *messageCopy = [message copy];
for (NSString *XPath in self.relevantContentXPaths) {
NSError *error;
NSArray *nodes = [message nodesForXPath:XPath error:&error];
NSArray *nodes = [messageCopy nodesForXPath:XPath error:&error];
if (!nodes) {
XMPPLogError(@"%@: %@ - Error querying XPath (%@): %@", THIS_FILE, THIS_METHOD, XPath, error);
continue;
Expand Down