From f15b9b4362bfe9d36e98561491bc475b3cb60c0d Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Wed, 11 Oct 2017 21:24:09 -0700 Subject: [PATCH] XEP-0280: Audit Carbons module --- Extensions/XEP-0280/XMPPMessageCarbons.h | 13 ++++--------- Extensions/XEP-0280/XMPPMessageCarbons.m | 10 ++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Extensions/XEP-0280/XMPPMessageCarbons.h b/Extensions/XEP-0280/XMPPMessageCarbons.h index 66960853d9..85ec103986 100644 --- a/Extensions/XEP-0280/XMPPMessageCarbons.h +++ b/Extensions/XEP-0280/XMPPMessageCarbons.h @@ -4,14 +4,8 @@ #define _XMPP_MESSAGE_CARBONS_H +NS_ASSUME_NONNULL_BEGIN @interface XMPPMessageCarbons : XMPPModule -{ - BOOL autoEnableMessageCarbons; - BOOL allowsUntrustedMessageCarbons; - BOOL messageCarbonsEnabled; - - XMPPIDTracker *xmppIDTracker; -} /** * Wether or not to automatically enable Message Carbons. @@ -26,7 +20,7 @@ * @see enableMessageCarbons * @see disableMessageCarbons **/ -@property (assign, getter = isMessageCarbonsEnabled,readonly) BOOL messageCarbonsEnabled; +@property (atomic, readonly) BOOL isMessageCarbonsEnabled; /** * Whether Message Carbons are validated before calling the delegate methods. @@ -62,4 +56,5 @@ - (void)xmppMessageCarbons:(XMPPMessageCarbons *)xmppMessageCarbons didReceiveMessage:(XMPPMessage *)message outgoing:(BOOL)isOutgoing; -@end \ No newline at end of file +@end +NS_ASSUME_NONNULL_END diff --git a/Extensions/XEP-0280/XMPPMessageCarbons.m b/Extensions/XEP-0280/XMPPMessageCarbons.m index 6111bfa08c..280196ee90 100644 --- a/Extensions/XEP-0280/XMPPMessageCarbons.m +++ b/Extensions/XEP-0280/XMPPMessageCarbons.m @@ -22,6 +22,16 @@ #define XMLNS_XMPP_MESSAGE_CARBONS @"urn:xmpp:carbons:2" +@interface XMPPMessageCarbons() +{ + BOOL autoEnableMessageCarbons; + BOOL allowsUntrustedMessageCarbons; + BOOL messageCarbonsEnabled; + + XMPPIDTracker *xmppIDTracker; +} +@end + @implementation XMPPMessageCarbons - (id)initWithDispatchQueue:(dispatch_queue_t)queue