Prevent sending with disabled identities

This commit is contained in:
M66B
2020-10-05 08:15:59 +02:00
parent d9e1d263d5
commit 0960d5cf86

View File

@@ -490,6 +490,8 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
EntityIdentity ident = db.identity().getIdentity(message.identity);
if (ident == null)
throw new IllegalArgumentException("Identity not found");
if (!ident.synchronize)
throw new IllegalArgumentException("Identity is disabled");
if (!message.content)
throw new IllegalArgumentException("Message body missing");