Skip to content

Commit

Permalink
Log whether signal-cli account is linked or master device
Browse files Browse the repository at this point in the history
  • Loading branch information
exquo committed Apr 21, 2021
1 parent 95d68f0 commit 443622c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scli
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,8 @@ class SignalData:
with open(self._file_path) as f:
self._data = json.load(f)

logging.debug("signal-cli account: %s device", "linked" if self.is_linked_device else "master")

profile_names = self._get_profile_names()

indivs = []
Expand Down Expand Up @@ -948,6 +950,11 @@ class SignalData:
def own_num(self):
return self._data['username']

@property
def is_linked_device(self):
# Assuming master device must always get `deviceId == 1`
return self._data['deviceId'] != 1


class Contact:

Expand Down

0 comments on commit 443622c

Please sign in to comment.