Skip to content

Commit

Permalink
Don't assert on alpha builds when querying whole mam archive
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Jan 10, 2024
1 parent d933290 commit e5e572e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Monal/Classes/XMPPIQ.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ -(void) setMAMQueryAfter:(NSString*) uid

-(void) setMAMQueryAfterTimestamp:(NSDate* _Nullable) timestamp
{
#ifdef IS_ALPHA
MLAssert(timestamp!=nil, @"setMAMQueryAfterTimestamp: called with nil timestamp!", @{@"self": self});
#endif
//set iq id to mam query id
self.id = [NSString stringWithFormat:@"MLcatchup:%@", [[NSUUID UUID] UUIDString]];
MLXMLNode* queryNode = [[MLXMLNode alloc] initWithElement:@"query" andNamespace:@"urn:xmpp:mam:2" withAttributes:@{
Expand All @@ -261,6 +258,11 @@ -(void) setMAMQueryAfterTimestamp:(NSDate* _Nullable) timestamp
] andData:nil]
] andData:nil];
[self addChildNode:queryNode];

#ifdef IS_ALPHA
if(timestamp == nil)
showXMLErrorOnAlpha(nil, self, @"setMAMQueryAfterTimestamp: called with nil timestamp!");
#endif
}

-(void) setRemoveFromRoster:(MLContact*) contact
Expand Down

0 comments on commit e5e572e

Please sign in to comment.