Permalink
Browse files

Fixing merge conflicts

  • Loading branch information...
1 parent 29e9422 commit be25aada5b4190277be194a633bfabca53caba43 @chrisballinger chrisballinger committed Nov 7, 2016
@@ -296,7 +296,7 @@
D93DDBA71BA79AA900CD8331 /* OTRXLFormCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 638C7CF31B02BF0D004F8EC3 /* OTRXLFormCreator.h */; settings = {ATTRIBUTES = (Public, ); }; };
D93DDBA81BA79AAA00CD8331 /* OTRXMPPServerListViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 63039E961B0D43FE007C9978 /* OTRXMPPServerListViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
D93DDBA91BA79AAB00CD8331 /* OTRXMPPLoginHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 634680811B0404CE00D9A1C5 /* OTRXMPPLoginHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
- D93DDBAB1BA79AAE00CD8331 /* OTRGoolgeOAuthLoginHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 634680881B041F2F00D9A1C5 /* OTRGoolgeOAuthLoginHandler.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ D93DDBAB1BA79AAE00CD8331 /* OTRGoolgeOAuthLoginHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 634680881B041F2F00D9A1C5 /* OTRGoolgeOAuthLoginHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
D93DDBAD1BA79AB000CD8331 /* OTRXMPPCreateAccountHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 6346808B1B04206400D9A1C5 /* OTRXMPPCreateAccountHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
D93DDBAE1BA79AB100CD8331 /* OTRLoginHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 63BE425C1B320EE20017058C /* OTRLoginHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
D93DDBAF1BA79AB200CD8331 /* OTRAboutViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 633106121A16D1A300C17BAE /* OTRAboutViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -372,10 +372,8 @@
D9AE3A331BA8D9AB00255537 /* OTRConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 633105EF1A16D1A300C17BAE /* OTRConstants.m */; };
D9AE3A341BA8DAB600255537 /* OTRLanguageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6331051B1A16D1A300C17BAE /* OTRLanguageManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
D9AE3A351BA8DAB600255537 /* OTRLanguageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6331051C1A16D1A300C17BAE /* OTRLanguageManager.m */; };
- D9B9B1331DC7F3AC0007F5A7 /* UserInfoProfileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B9B1311DC7F3AC0007F5A7 /* UserInfoProfileCell.swift */; };
- D9B9B1351DC7F3BF0007F5A7 /* UserInfoProfileCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D9B9B1321DC7F3AC0007F5A7 /* UserInfoProfileCell.xib */; };
- D9B9B1371DC802480007F5A7 /* OTRUserInfoProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = D9B9B1361DC802480007F5A7 /* OTRUserInfoProfile.h */; settings = {ATTRIBUTES = (Public, ); }; };
- D9BEF8E01DCE6E12009945D1 /* OTRXMPPManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = D9BEF8DF1DCE6E12009945D1 /* OTRXMPPManager_Private.h */; };
+ D9B786AE1DD136280050CE38 /* OTRXMPPMessageStatusModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B786AD1DD136280050CE38 /* OTRXMPPMessageStatusModule.swift */; };
+ D9B786B01DD1363D0050CE38 /* OTRStreamManagementDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B786AF1DD1363D0050CE38 /* OTRStreamManagementDelegate.swift */; };
D9CBBC581C642BAA005CD715 /* EnablePushViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CBBC571C642BAA005CD715 /* EnablePushViewController.swift */; };
D9EEEDD31D2739A800B8BC54 /* OTRvCard.h in Headers */ = {isa = PBXBuildFile; fileRef = D9EEEDD11D27388600B8BC54 /* OTRvCard.h */; settings = {ATTRIBUTES = (Public, ); }; };
DDE1CAF4312DE1C724A33B72 /* Pods_ChatSecureCorePods_ChatSecureCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 31610826406FD0CB714045AD /* Pods_ChatSecureCorePods_ChatSecureCore.framework */; };
@@ -837,10 +835,11 @@
D9AE3A261BA8D0DB00255537 /* OTRAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTRAssets.m; sourceTree = "<group>"; };
D9AE3A2E1BA8D84500255537 /* OTRBranding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTRBranding.h; sourceTree = "<group>"; };
D9AE3A2F1BA8D84500255537 /* OTRBranding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTRBranding.m; sourceTree = "<group>"; };
+ D9B786AD1DD136280050CE38 /* OTRXMPPMessageStatusModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTRXMPPMessageStatusModule.swift; sourceTree = "<group>"; };
+ D9B786AF1DD1363D0050CE38 /* OTRStreamManagementDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTRStreamManagementDelegate.swift; sourceTree = "<group>"; };
D9BE65431B6A08ED002D4136 /* XMPPServerInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMPPServerInfoCell.h; sourceTree = "<group>"; };
D9BE65441B6A08ED002D4136 /* XMPPServerInfoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XMPPServerInfoCell.m; sourceTree = "<group>"; };
D9BE65451B6A08ED002D4136 /* XMPPServerInfoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = XMPPServerInfoCell.xib; path = Interface/XMPPServerInfoCell.xib; sourceTree = "<group>"; };
- D9BEF8DF1DCE6E12009945D1 /* OTRXMPPManager_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTRXMPPManager_Private.h; sourceTree = "<group>"; };
D9C6E69D1B7148EF00572273 /* OTRUsernameCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = OTRUsernameCell.xib; path = Interface/OTRUsernameCell.xib; sourceTree = "<group>"; };
D9C6E6A01B71575300572273 /* OTRUsernameCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTRUsernameCell.swift; sourceTree = "<group>"; };
D9CBBC571C642BAA005CD715 /* EnablePushViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EnablePushViewController.swift; path = "ChatSecure/Classes/View Controllers/Onboarding/EnablePushViewController.swift"; sourceTree = SOURCE_ROOT; };
@@ -953,6 +952,7 @@
6331050E1A16D1A300C17BAE /* Controllers */ = {
isa = PBXGroup;
children = (
+ D9B786AD1DD136280050CE38 /* OTRXMPPMessageStatusModule.swift */,
63CBD67F1C642B6B00AC6D1F /* YapExtensions */,
631098B01BD6FED000494A47 /* YapDatabse+ChatSecure.swift */,
63363FAD1CCAE29B00B0C720 /* OTRYapExtensions.swift */,
@@ -1007,7 +1007,7 @@
633105321A16D1A300C17BAE /* XMPP */ = {
isa = PBXGroup;
children = (
- D9BEF8DF1DCE6E12009945D1 /* OTRXMPPManager_Private.h */,
+ D9B786AF1DD1363D0050CE38 /* OTRStreamManagementDelegate.swift */,
63B916E01B743198003B778F /* OTRStreamManagementYapStorage.h */,
63B916E11B743198003B778F /* OTRStreamManagementYapStorage.m */,
637DBB1A1B7D5A23003845B7 /* OTRXMPPMessageYapStroage.h */,
@@ -1674,7 +1674,6 @@
639C352A1C3DDDDE00132330 /* OTRXMPPBuddyManager.h in Headers */,
63D14F351C0FC7A60029F36B /* OTRThreadOwner.h in Headers */,
D93DDBAB1BA79AAE00CD8331 /* OTRGoolgeOAuthLoginHandler.h in Headers */,
- D93DDBAC1BA79AAF00CD8331 /* OTRChatSecureIDCreateAccountHandler.h in Headers */,
D93DDBAD1BA79AB000CD8331 /* OTRXMPPCreateAccountHandler.h in Headers */,
D93DDBAE1BA79AB100CD8331 /* OTRLoginHandler.h in Headers */,
D93DDBAF1BA79AB200CD8331 /* OTRAboutViewController.h in Headers */,
@@ -1698,71 +1697,12 @@
D93DDBBF1BA79AC700CD8331 /* OTRMessagesHoldTalkViewController.h in Headers */,
D93DDBC01BA79AC800CD8331 /* OTRNewBuddyViewController.h in Headers */,
D93DDBC11BA79ACA00CD8331 /* OTRQRCodeViewController.h in Headers */,
- 6369855A1BC875110083FC53 /* OTRXMPPRoomManager.h in Headers */,
- 63BB66AF1BC5D2F40004A619 /* OTRXMPPRoomYapStorage.h in Headers */,
- D935EF0B1CFFA19A005A1AC8 /* OTRBuddyApprovalCell.h in Headers */,
- 639C352A1C3DDDDE00132330 /* OTRXMPPBuddyManager.h in Headers */,
- D93DDBC71BA79AD200CD8331 /* XMPPServerInfoCell.h in Headers */,
- D93DDB311BA79A7000CD8331 /* UIViewController+ChatSecure.h in Headers */,
- D93DDB301BA79A7000CD8331 /* UIImage+ChatSecure.h in Headers */,
- D93DDB2F1BA79A7000CD8331 /* UIActivityViewController+ChatSecure.h in Headers */,
- D93DDB2E1BA79A7000CD8331 /* UIActivity+ChatSecure.h in Headers */,
- D9BEF8E01DCE6E12009945D1 /* OTRXMPPManager_Private.h in Headers */,
- D93DDB2D1BA79A7000CD8331 /* UIActionSheet+ChatSecure.h in Headers */,
- D93DDB471BA79A7200CD8331 /* OTRvCardYapDatabaseStorage.h in Headers */,
- D93DDB4C1BA79A7300CD8331 /* OTRYapDatabaseRosterStorage.h in Headers */,
- D93DDB4B1BA79A7300CD8331 /* OTRXMPPTorManager.h in Headers */,
- D93DDB891BA79A8C00CD8331 /* OTRXMPPTorAccount.h in Headers */,
- D93DDBA81BA79AAA00CD8331 /* OTRXMPPServerListViewController.h in Headers */,
- D93DDB4E1BA79A7300CD8331 /* OTRXMPPServerInfo.h in Headers */,
- D93DDB4A1BA79A7300CD8331 /* OTRXMPPProxyStream.h in Headers */,
- D93DDB931BA79A9400CD8331 /* OTRXMPPPresenceSubscriptionRequest.h in Headers */,
- D93DDB461BA79A7200CD8331 /* OTRXMPPMessageYapStroage.h in Headers */,
- D93DDB9F1BA79AA100CD8331 /* OTRXMPPError.h in Headers */,
- D93DDB481BA79A7200CD8331 /* OTRXMPPBudyTimers.h in Headers */,
- D93DDB921BA79A9300CD8331 /* OTRXMPPBuddy.h in Headers */,
- D93DDBA21BA79AA400CD8331 /* OTRWelcomeAccountTableViewDelegate.h in Headers */,
- D93DDB831BA79A8800CD8331 /* OTRViewSetting.h in Headers */,
- D93DDB8C1BA79A8E00CD8331 /* OTRVideoItem.h in Headers */,
- D93DDB821BA79A8700CD8331 /* OTRValueSetting.h in Headers */,
- D93DDB9E1BA79AA000CD8331 /* OTRUtilities.h in Headers */,
- D93DDBDE1BA79AF900CD8331 /* OTRTouchAndHoldGestureRecognizer.h in Headers */,
- D93DDB3F1BA79A7100CD8331 /* OTRTorManager.h in Headers */,
- D93DDB741BA79A8000CD8331 /* OTRToastOptions.h in Headers */,
- D93DDBDB1BA79AF300CD8331 /* OTRTitleSubtitleView.h in Headers */,
- D93DDBCF1BA79ADE00CD8331 /* OTRTextFieldTableViewCell.h in Headers */,
- D93DDB451BA79A7200CD8331 /* OTRStreamManagementYapStorage.h in Headers */,
- D93DDB8E1BA79A9000CD8331 /* OTRStreamManagementStorageObject.h in Headers */,
- D93DDBCE1BA79ADD00CD8331 /* OTRStatusMessageCell.h in Headers */,
- D93DDBDA1BA79AF100CD8331 /* OTRSocialButtonsView.h in Headers */,
- D93DDB811BA79A8700CD8331 /* OTRShareSetting.h in Headers */,
- D93DDBC31BA79ACC00CD8331 /* OTRSettingsViewController.h in Headers */,
- D93DDB801BA79A8600CD8331 /* OTRSettingsGroup.h in Headers */,
- D93DDBCD1BA79ADB00CD8331 /* OTRSettingTableViewCell.h in Headers */,
D93DDBC21BA79ACB00CD8331 /* OTRSettingDetailViewController.h in Headers */,
D93DDBC31BA79ACC00CD8331 /* OTRSettingsViewController.h in Headers */,
D978BC921BABE0F4009246CF /* OTRTheme.h in Headers */,
D93DDBC51BA79ACF00CD8331 /* OTRCircleView.h in Headers */,
D93DDBC61BA79AD000CD8331 /* OTRCircleButtonView.h in Headers */,
- D93DDBB51BA79ABA00CD8331 /* OTRChooseAccountViewController.h in Headers */,
- D93DDB961BA79A9800CD8331 /* OTRChatDemo.h in Headers */,
- D93DDBB31BA79AB700CD8331 /* OTRCertificatesViewController.h in Headers */,
- D93DDB761BA79A8100CD8331 /* OTRCertificateSetting.h in Headers */,
- D93DDB951BA79A9600CD8331 /* OTRCertificatePinning.h in Headers */,
- D93DDBB21BA79AB600CD8331 /* OTRCertificateDomainViewController.h in Headers */,
- D93DDBD01BA79AE000CD8331 /* OTRButtonView.h in Headers */,
- D93DDBB11BA79AB500CD8331 /* OTRBuddyViewController.h in Headers */,
- D93DDB751BA79A8000CD8331 /* OTRBoolSetting.h in Headers */,
- D93DDBDD1BA79AF700CD8331 /* OTRAudioTrashView.h in Headers */,
- D93DDB411BA79A7100CD8331 /* OTRAudioSessionManager.h in Headers */,
- 6326D9AF1DC3D0F100D72403 /* OTRYapMessageSendAction.h in Headers */,
- D93DDB421BA79A7100CD8331 /* OTRAudioPlaybackController.h in Headers */,
- D93DDB8D1BA79A8F00CD8331 /* OTRAudioItem.h in Headers */,
- D93DDBD11BA79AE200CD8331 /* OTRAudioControlsView.h in Headers */,
- D93DDB351BA79A7000CD8331 /* OTRAttachmentPicker.h in Headers */,
- D93DDBA41BA79AA600CD8331 /* OTRAddBuddyQRCodeViewController.h in Headers */,
- D93DDB6F1BA79A7E00CD8331 /* OTRActivityItemProvider.h in Headers */,
- D93DDBB01BA79AB300CD8331 /* OTRAcknowledgementsViewController.h in Headers */,
+ D93DDBC71BA79AD200CD8331 /* XMPPServerInfoCell.h in Headers */,
D93DDBC81BA79AD300CD8331 /* OTRAccountTableViewCell.h in Headers */,
D93DDBC91BA79AD500CD8331 /* OTRBuddyImageCell.h in Headers */,
D93DDBCA1BA79AD700CD8331 /* OTRBuddyInfoCell.h in Headers */,
@@ -2254,6 +2194,7 @@
D93DDA8A1BA79A2400CD8331 /* OTRSettingsManager.m in Sources */,
D93DDA8B1BA79A2400CD8331 /* OTRTorManager.m in Sources */,
D93DDA8C1BA79A2400CD8331 /* OTRNotificationController.m in Sources */,
+ D9B786AE1DD136280050CE38 /* OTRXMPPMessageStatusModule.swift in Sources */,
63E353B81BB9D83B005C54C3 /* OTRPushTLVHandler.m in Sources */,
D93DDA8D1BA79A2400CD8331 /* OTRAudioSessionManager.m in Sources */,
D93DDA8E1BA79A2400CD8331 /* OTRAudioPlaybackController.m in Sources */,
@@ -2289,6 +2230,7 @@
D93DDAC01BA79A2600CD8331 /* OTRBoolSetting.m in Sources */,
D93DDAC11BA79A2600CD8331 /* OTRCertificateSetting.m in Sources */,
D93DDAC21BA79A2600CD8331 /* OTRDonateSetting.m in Sources */,
+ D9B786B01DD1363D0050CE38 /* OTRStreamManagementDelegate.swift in Sources */,
D9CBBC581C642BAA005CD715 /* EnablePushViewController.swift in Sources */,
D93DDAC31BA79A2600CD8331 /* OTRDoubleSetting.m in Sources */,
D93DDAC41BA79A2600CD8331 /* OTRFeedbackSetting.m in Sources */,
@@ -2347,8 +2289,6 @@
D93DDAF21BA79A2800CD8331 /* OTRXMPPServerListViewController.m in Sources */,
D93DDAF31BA79A2800CD8331 /* OTRXMPPLoginHandler.m in Sources */,
D93DDAF51BA79A2800CD8331 /* OTRGoolgeOAuthLoginHandler.m in Sources */,
- D92AC2091DB023D8007BD3E7 /* UserProfileViewController.swift in Sources */,
- 6326D9B01DC3D0F100D72403 /* OTRYapMessageSendAction.m in Sources */,
D93DDAF71BA79A2900CD8331 /* OTRXMPPCreateAccountHandler.m in Sources */,
D93DDAF81BA79A2900CD8331 /* OTRLoginHandler.m in Sources */,
D93DDAF91BA79A2900CD8331 /* OTRAboutViewController.m in Sources */,
@@ -0,0 +1,68 @@
+//
+// OTRXMPPMessageStatusModule.swift
+// ChatSecure
+//
+// Created by David Chiles on 5/5/16.
+// Copyright © 2016 Chris Ballinger. All rights reserved.
+//
+
+import Foundation
+import XMPPFramework
+
+@objc public protocol OTRXMPPMessageStatusModuleDelegate {
+ func didSendMessage(messageKey:String, messageCollection:String)
+ func didFailToSendMessage(messageKey:String, messageCollection:String, error:NSError?)
+}
+
+/**
+ This is a simple XMPP module that translates xmpp message events to OTRMessageEvents for the delegate.
+ Should be used in coordination with MessageQueueHandler.
+ */
+@objc public class OTRXMPPMessageStatusModule:XMPPModule,XMPPStreamDelegate {
+
+ let databaseConnection:YapDatabaseConnection
+ var delegate:OTRXMPPMessageStatusModuleDelegate?
+ var delegateQueue = dispatch_queue_create("OTRXMPPMessageStatusModuleDelegate", DISPATCH_QUEUE_SERIAL)
+
+ public init(databaseConnection:YapDatabaseConnection, delegate:OTRXMPPMessageStatusModuleDelegate?) {
+ self.delegate = delegate
+ self.databaseConnection = databaseConnection
+ super.init(dispatchQueue: nil)
+ }
+
+ //Mark: YapDatbase functions
+
+ private func fetchMessage(XMPPId:String) -> OTRMessageProtocol? {
+ var message:OTRMessageProtocol? = nil
+ self.databaseConnection.readWithBlock { (transaction) in
+ message = OTRMessage.messageForMessageId(XMPPId, incoming: false, transaction: transaction)
+ }
+ return message
+ }
+
+ //Mark: XMPPStream delegate functions
+ public func xmppStream(sender: XMPPStream!, didSendMessage message: XMPPMessage!) {
+
+ guard let messageId = message.attributeStringValueForName("id") where message.isChatMessage() else {
+ return
+ }
+
+ if let message = self.fetchMessage(messageId) {
+ self.delegate?.didSendMessage(message.messageKey(), messageCollection: message.messageCollection())
+ }
+ }
+
+ public func xmppStream(sender: XMPPStream!, didFailToSendMessage message: XMPPMessage!, error: NSError!) {
+
+ guard let messageId = message.attributeStringValueForName("id") where message.isChatMessage() else {
+ return
+ }
+
+ if let message = self.fetchMessage(messageId) {
+ self.delegate?.didFailToSendMessage(message.messageKey(), messageCollection: message.messageCollection(), error: error)
+ }
+
+ }
+
+
+}
@@ -0,0 +1,49 @@
+//
+// OTRStreamManagementDelegate.swift
+// ChatSecure
+//
+// Created by David Chiles on 6/15/16.
+// Copyright © 2016 Chris Ballinger. All rights reserved.
+//
+
+import Foundation
+import XMPPFramework
+import YapDatabase
+
+/**
+ * The purpose of this class is to know if XEP-0198 is enabled and to mark messages when they are acknowledged by the server with the correct date
+ */
+@objc public class OTRStreamManagementDelegate:NSObject, XMPPStreamManagementDelegate {
+
+ private(set) public var streamManagementEnabled = false
+ private let databaseConnection:YapDatabaseConnection
+
+ public init(databaseConnection:YapDatabaseConnection) {
+ self.databaseConnection = databaseConnection
+ }
+
+ @objc public func xmppStreamManagement(sender: XMPPStreamManagement!, wasEnabled enabled: DDXMLElement!) {
+ self.streamManagementEnabled = true
+ }
+ @objc public func xmppStreamManagement(sender: XMPPStreamManagement!, wasNotEnabled failed: DDXMLElement!) {
+ self.streamManagementEnabled = false
+ }
+
+ @objc public func xmppStreamManagement(sender: XMPPStreamManagement!, didReceiveAckForStanzaIds stanzaIds: [AnyObject]!) {
+
+ self.databaseConnection.asyncReadWriteWithBlock { (transaction) in
+ for object in stanzaIds {
+ guard let stanzaId = object as? String else {
+ return
+ }
+
+ if let message = OTRMessage.messageForMessageId(stanzaId, incoming: false, transaction: transaction) as? OTRMessage{
+ message.dateAcked = NSDate()
+ message.saveWithTransaction(transaction)
+ }
+ }
+ }
+
+
+ }
+}
@@ -9,7 +9,6 @@
#import "OTRGoogleOAuthXMPPAccount.h"
#import "GTMOAuth2Authentication.h"
#import "GTMOAuth2SignIn.h"
-#import "OTRSecrets.h"
@import OTRAssets;
#import "OTRConstants.h"
#import "OTRLanguageManager.h"
@@ -55,6 +55,8 @@ extern const struct OTRMessageAttributes {
@interface OTRMessage : OTRYapDatabaseObject <YapDatabaseRelationshipNode, OTRMessageProtocol>
@property (nonatomic, strong) NSDate *date;
+/** OUTGOING ONLY. The date that the message is acknowledged by the server. Only relevant if the stream supporrts XEP-0198 at the time of sending*/
+@property (nonatomic, strong, nullable) NSDate *dateAcked;
@property (nonatomic, strong) NSString *text;
@property (nonatomic, strong) NSString *messageId;
@property (nonatomic, strong) NSError *error;
@@ -70,5 +72,6 @@ extern const struct OTRMessageAttributes {
+ (void)deleteAllMessagesForBuddyId:(NSString *)uniqueBuddyId transaction:(YapDatabaseReadWriteTransaction*)transaction;
+ (void)deleteAllMessagesForAccountId:(NSString *)uniqueAccountId transaction:(YapDatabaseReadWriteTransaction*)transaction;
+ (void)receivedDeliveryReceiptForMessageId:(NSString *)messageId transaction:(YapDatabaseReadWriteTransaction*)transaction;
++ (nullable id<OTRMessageProtocol>)messageForMessageId:(nonnull NSString *)messageId incoming:(BOOL)incoming transaction:(nonnull YapDatabaseReadTransaction *)transaction;
@end
Oops, something went wrong.

0 comments on commit be25aad

Please sign in to comment.