MESSENGER-4390 fix private room sharing

This commit is contained in:
JanNiklas Grabowski
2023-06-15 10:21:50 +02:00
parent 33b943d31f
commit 6bf886499d
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -4132,7 +4132,9 @@ static CGSize kThreadListBarButtonItemImageSize;
if (selectedEvent.sentState == MXEventSentStateSent &&
!selectedEvent.isTimelinePollEvent &&
// Forwarding of live-location shares still to be implemented
selectedEvent.eventType != MXEventTypeBeaconInfo)
selectedEvent.eventType != MXEventTypeBeaconInfo &&
// bwi #4390: remove forwarding action if room is private
![self.roomDataSource.room.summary.joinRule isEqualToString: kMXRoomJoinRuleInvite])
{
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeForward
action:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward]
@@ -4184,7 +4186,9 @@ static CGSize kThreadListBarButtonItemImageSize;
if (selectedEvent.sentState == MXEventSentStateSent && (attachment.type == MXKAttachmentTypeFile ||
attachment.type == MXKAttachmentTypeImage ||
attachment.type == MXKAttachmentTypeVideo ||
attachment.type == MXKAttachmentTypeVoiceMessage)) {
attachment.type == MXKAttachmentTypeVoiceMessage) &&
// bwi #4390: remove forwarding action if room is private
![self.roomDataSource.room.summary.joinRule isEqualToString: kMXRoomJoinRuleInvite]) {
[self.eventMenuBuilder addItemWithType:EventMenuItemTypeForward
action:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionForward]
style:UIAlertActionStyleDefault