Message attachment check fixed

Replace allow-by-default with same condition we have for sending messages to channel
This commit is contained in:
Denis Arh
2019-09-09 13:04:12 +02:00
parent b2d678f758
commit 904b38c3e3
+1 -1
View File
@@ -137,7 +137,7 @@ func (svc accessControl) CanEmbedMessage(ctx context.Context, ch *types.Channel)
}
func (svc accessControl) CanAttachMessage(ctx context.Context, ch *types.Channel) bool {
return svc.can(ctx, ch, "message.attach", permissions.Allowed)
return svc.can(ctx, ch, "message.attach", svc.canSendMessagesFallback(ch))
}
func (svc accessControl) CanUpdateOwnMessages(ctx context.Context, ch *types.Channel) bool {