That fuck shit the fascists are using
1package org.tm.archive.logsubmit;
2
3import android.content.Context;
4import android.database.Cursor;
5
6import androidx.annotation.NonNull;
7
8import org.signal.core.util.AsciiArt;
9import org.tm.archive.database.SignalDatabase;
10import org.tm.archive.keyvalue.SignalStore;
11
12/**
13 * Renders data pertaining to sender key. While all private info is obfuscated, this is still only intended to be printed for internal users.
14 */
15public class LogSectionSenderKey implements LogSection {
16
17 @Override
18 public @NonNull String getTitle() {
19 return "SENDER KEY";
20 }
21
22 @Override
23 public @NonNull CharSequence getContent(@NonNull Context context) {
24 StringBuilder builder = new StringBuilder();
25
26 builder.append("--- Sender Keys Created By This Device").append("\n\n");
27 if (SignalStore.account().getAci() != null){
28 try (Cursor cursor = SignalDatabase.senderKeys().getAllCreatedBySelf()) {
29 builder.append(AsciiArt.tableFor(cursor)).append("\n\n");
30 }
31 } else {
32 builder.append("<no ACI assigned yet>").append("\n\n");
33 }
34
35 builder.append("--- Sender Key Shared State").append("\n\n");
36 try (Cursor cursor = SignalDatabase.senderKeyShared().getAllSharedWithCursor()) {
37 builder.append(AsciiArt.tableFor(cursor)).append("\n");
38 }
39
40 return builder;
41 }
42}