Add support for contact color sync and receiving blocklists and expiring messages

This commit is contained in:
AsamK 2016-08-27 13:22:11 +02:00
parent 6597d48ecc
commit e4618456a1
3 changed files with 28 additions and 5 deletions

View file

@ -1017,6 +1017,9 @@ class Manager implements Signal {
} catch (Exception e) {
e.printStackTrace();
}
if (syncMessage.getBlockedList().isPresent()) {
// TODO store list of blocked numbers
}
}
if (syncMessage.getContacts().isPresent()) {
try {
@ -1028,6 +1031,9 @@ class Manager implements Signal {
if (c.getName().isPresent()) {
contact.name = c.getName().get();
}
if (c.getColor().isPresent()) {
contact.color = c.getColor().get();
}
contactStore.updateContact(contact);
if (c.getAvatar().isPresent()) {
@ -1264,7 +1270,7 @@ class Manager implements Signal {
try {
for (ContactInfo record : contactStore.getContacts()) {
out.write(new DeviceContact(record.number, Optional.fromNullable(record.name),
createContactAvatarAttachment(record.number)));
createContactAvatarAttachment(record.number), Optional.fromNullable(record.color)));
}
} finally {
out.close();