mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
RoomBubbleCellData: Add logs to track missing beacon info summary associated to a start beacon info.
This commit is contained in:
@@ -165,7 +165,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
self.collapsable = NO;
|
||||
self.collapsed = NO;
|
||||
|
||||
[self updateBeaconInfoSummaryWithEventId:event.eventId];
|
||||
[self updateBeaconInfoSummaryWithId:event.eventId andEvent:event];
|
||||
break;
|
||||
}
|
||||
case MXEventTypeCustom:
|
||||
@@ -224,7 +224,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagLiveLocation)
|
||||
{
|
||||
[self updateBeaconInfoSummaryWithEventId:eventId];
|
||||
[self updateBeaconInfoSummaryWithId:eventId andEvent:event];
|
||||
}
|
||||
|
||||
return retVal;
|
||||
@@ -1361,10 +1361,27 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)updateBeaconInfoSummaryWithEventId:(NSString *)eventId
|
||||
- (void)updateBeaconInfoSummaryWithId:(NSString *)eventId andEvent:(MXEvent*)event
|
||||
{
|
||||
if (event.eventType != MXEventTypeBeaconInfo)
|
||||
{
|
||||
MXLogError(@"[RoomBubbleCellData] Try to update beacon info summary with wrong event type with event id %@", eventId);
|
||||
return;
|
||||
}
|
||||
|
||||
id<MXBeaconInfoSummaryProtocol> beaconInfoSummary = [self.mxSession.aggregations.beaconAggregations beaconInfoSummaryFor:eventId inRoomWithId:self.roomId];
|
||||
|
||||
if (!beaconInfoSummary)
|
||||
{
|
||||
MXBeaconInfo *beaconInfo = [[MXBeaconInfo alloc] initWithMXEvent:event];
|
||||
|
||||
// A start beacon info event (isLive == true) should have an associated BeaconInfoSummary
|
||||
if (beaconInfo && beaconInfo.isLive)
|
||||
{
|
||||
MXLogError(@"[RoomBubbleCellData] No beacon info summary found for beacon info start event with id %@", eventId);
|
||||
}
|
||||
}
|
||||
|
||||
self.beaconInfoSummary = beaconInfoSummary;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user