Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,12 @@ public GenericEvent buildTextNote(Identity sender, String content) {
}

public GenericEvent buildRecipientTextNote(String content, List<PubKeyTag> tags) {
return buildRecipientTextNote(null, content, tags);
}

public GenericEvent buildRecipientTextNote(
Identity sender, String content, List<PubKeyTag> tags) {
return new GenericEventFactory<PubKeyTag>(
resolveSender(sender), Kind.TEXT_NOTE.getValue(), tags, content)
return new GenericEventFactory<>(resolveSender(null), Kind.TEXT_NOTE.getValue(), tags, content)
.create();
}

public GenericEvent buildTaggedTextNote(@NonNull List<BaseTag> tags, @NonNull String content) {
return buildTaggedTextNote(null, tags, content);
}

public GenericEvent buildTaggedTextNote(
Identity sender, @NonNull List<BaseTag> tags, @NonNull String content) {
return new GenericEventFactory<BaseTag>(
resolveSender(sender), Kind.TEXT_NOTE.getValue(), tags, content)
return new GenericEventFactory<>(resolveSender(null), Kind.TEXT_NOTE.getValue(), tags, content)
.create();
}

Expand Down Expand Up @@ -84,18 +72,12 @@ public GenericEvent buildReplaceableEvent(
return buildReplaceableEvent(null, tags, kind, content);
}

public GenericEvent buildReplaceableEvent(
Identity sender, List<BaseTag> tags, Integer kind, String content) {
return new GenericEventFactory<BaseTag>(resolveSender(sender), kind, tags, content).create();
public GenericEvent buildReplaceableEvent(List<BaseTag> tags, Integer kind, String content) {
return new GenericEventFactory<>(resolveSender(null), kind, tags, content).create();
}

public GenericEvent buildEphemeralEvent(List<BaseTag> tags, Integer kind, String content) {
return buildEphemeralEvent(null, tags, kind, content);
}

public GenericEvent buildEphemeralEvent(
Identity sender, List<BaseTag> tags, Integer kind, String content) {
return new GenericEventFactory<BaseTag>(resolveSender(sender), kind, tags, content).create();
return new GenericEventFactory<>(resolveSender(null), kind, tags, content).create();
}

public GenericEvent buildEphemeralEvent(Integer kind, String content) {
Expand All @@ -117,14 +99,7 @@ public GenericEvent buildAddressableEvent(

public GenericEvent buildAddressableEvent(
@NonNull List<GenericTag> tags, @NonNull Integer kind, String content) {
return buildAddressableEvent(null, tags, kind, content);
}

public GenericEvent buildAddressableEvent(
Identity sender, @NonNull List<GenericTag> tags, @NonNull Integer kind, String content) {
return new GenericEventFactory<GenericTag>(
resolveSender(sender), kind, tags, content)
.create();
return new GenericEventFactory<>(resolveSender(null), kind, tags, content).create();
}

private Identity resolveSender(Identity override) {
Expand Down