mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-20 13:34:23 +00:00
Fix hiding contacts
This commit is contained in:
parent
7a82283762
commit
1af03e3e16
@ -841,7 +841,7 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re
|
|||||||
final var sql = (
|
final var sql = (
|
||||||
"""
|
"""
|
||||||
UPDATE %s
|
UPDATE %s
|
||||||
SET given_name = ?, family_name = ?, nick_name = ?, expiration_time = ?, expiration_time_version = ?, mute_until = ?, hide_story = ?, profile_sharing = ?, color = ?, blocked = ?, archived = ?, unregistered_timestamp = ?, nick_name_given_name = ?, nick_name_family_name = ?, note = ?
|
SET given_name = ?, family_name = ?, nick_name = ?, expiration_time = ?, expiration_time_version = ?, mute_until = ?, hide_story = ?, profile_sharing = ?, color = ?, blocked = ?, archived = ?, unregistered_timestamp = ?, nick_name_given_name = ?, nick_name_family_name = ?, note = ?, hidden = ?
|
||||||
WHERE _id = ?
|
WHERE _id = ?
|
||||||
"""
|
"""
|
||||||
).formatted(TABLE_RECIPIENT);
|
).formatted(TABLE_RECIPIENT);
|
||||||
@ -865,7 +865,8 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re
|
|||||||
statement.setString(13, contact == null ? null : contact.nickNameGivenName());
|
statement.setString(13, contact == null ? null : contact.nickNameGivenName());
|
||||||
statement.setString(14, contact == null ? null : contact.nickNameFamilyName());
|
statement.setString(14, contact == null ? null : contact.nickNameFamilyName());
|
||||||
statement.setString(15, contact == null ? null : contact.note());
|
statement.setString(15, contact == null ? null : contact.note());
|
||||||
statement.setLong(16, recipientId.id());
|
statement.setBoolean(16, contact != null && contact.isHidden());
|
||||||
|
statement.setLong(17, recipientId.id());
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
}
|
}
|
||||||
if (contact != null && contact.unregisteredTimestamp() != null) {
|
if (contact != null && contact.unregisteredTimestamp() != null) {
|
||||||
|
|||||||
@ -60,13 +60,7 @@ public class UpdateContactCommand implements JsonRpcLocalCommand {
|
|||||||
var nickGivenName = ns.getString("nick-given-name");
|
var nickGivenName = ns.getString("nick-given-name");
|
||||||
var nickFamilyName = ns.getString("nick-family-name");
|
var nickFamilyName = ns.getString("nick-family-name");
|
||||||
var note = ns.getString("note");
|
var note = ns.getString("note");
|
||||||
if (givenName != null
|
|
||||||
|| familyName != null
|
|
||||||
|| nickGivenName != null
|
|
||||||
|| nickFamilyName != null
|
|
||||||
|| note != null) {
|
|
||||||
m.setContactName(recipient, givenName, familyName, nickGivenName, nickFamilyName, note);
|
m.setContactName(recipient, givenName, familyName, nickGivenName, nickFamilyName, note);
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IOErrorException("Update contact error: " + e.getMessage(), e);
|
throw new IOErrorException("Update contact error: " + e.getMessage(), e);
|
||||||
} catch (NotPrimaryDeviceException e) {
|
} catch (NotPrimaryDeviceException e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user