Fix NPE when receiving contacts sync message

Fixes #191
This commit is contained in:
AsamK 2019-02-13 21:19:31 +01:00
parent c90d5db608
commit 6d5cfa32e2

View file

@ -1149,6 +1149,10 @@ public class Manager implements Signal {
}
if (c.getExpirationTimer().isPresent()) {
ThreadInfo thread = account.getThreadStore().getThread(c.getNumber());
if (thread == null) {
thread = new ThreadInfo();
thread.id = c.getNumber();
}
thread.messageExpirationTime = c.getExpirationTimer().get();
account.getThreadStore().updateThread(thread);
}