114.7 - Beta (114107)

This commit is contained in:
Juby210 2022-02-12 09:10:41 +00:00
parent 3e8039ce64
commit e7d8dea6da
50 changed files with 294 additions and 565 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId 'com.discord' applicationId 'com.discord'
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 114106 versionCode 114107
versionName "114.6 - Beta" versionName "114.7 - Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="114106" android:versionName="114.6 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="114107" android:versionName="114.7 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View File

@ -20,7 +20,6 @@ import com.discord.api.sticker.Sticker;
import com.discord.api.sticker.StickerPartial; import com.discord.api.sticker.StickerPartial;
import com.discord.api.user.User; import com.discord.api.user.User;
import com.discord.api.utcdatetime.UtcDateTime; import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.g0.w; import d0.g0.w;
import d0.t.h0; import d0.t.h0;
import d0.z.d.m; import d0.z.d.m;
@ -40,7 +39,7 @@ public final class Message {
private final User author; private final User author;
private Map<String, MessageReaction> cachedReactionsMap; private Map<String, MessageReaction> cachedReactionsMap;
private final MessageCall call; private final MessageCall call;
private final CaptchaHelper.CaptchaPayload captchaPayload; private final String captchaKey;
private final long channelId; private final long channelId;
private final List<Component> components; private final List<Component> components;
private final String content; private final String content;
@ -86,7 +85,7 @@ public final class Message {
/* JADX DEBUG: Multi-variable search result rejected for r34v0, resolved type: java.util.List<? extends com.discord.api.botuikit.Component> */ /* JADX DEBUG: Multi-variable search result rejected for r34v0, resolved type: java.util.List<? extends com.discord.api.botuikit.Component> */
/* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Multi-variable type inference failed */
public Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, CaptchaHelper.CaptchaPayload captchaPayload) { public Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, String str3) {
this.f2721id = j; this.f2721id = j;
this.channelId = j2; this.channelId = j2;
this.guildId = l; this.guildId = l;
@ -124,12 +123,12 @@ public final class Message {
this.lastManualAttemptTimestamp = l5; this.lastManualAttemptTimestamp = l5;
this.initialAttemptTimestamp = l6; this.initialAttemptTimestamp = l6;
this.localAttachments = list9; this.localAttachments = list9;
this.captchaPayload = captchaPayload; this.captchaKey = str3;
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, CaptchaHelper.CaptchaPayload captchaPayload, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, String str3, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(j, j2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : user, (i & 16) != 0 ? null : str, (i & 32) != 0 ? null : utcDateTime, (i & 64) != 0 ? null : utcDateTime2, (i & 128) != 0 ? null : bool, (i & 256) != 0 ? null : bool2, (i & 512) != 0 ? null : list, (i & 1024) != 0 ? null : list2, (i & 2048) != 0 ? null : list3, (i & 4096) != 0 ? null : list4, (i & 8192) != 0 ? null : list5, (i & 16384) != 0 ? null : str2, (32768 & i) != 0 ? null : bool3, (65536 & i) != 0 ? null : l2, (131072 & i) != 0 ? null : num, (262144 & i) != 0 ? null : messageActivity, (524288 & i) != 0 ? null : application, (1048576 & i) != 0 ? null : l3, (2097152 & i) != 0 ? null : messageReference, (4194304 & i) != 0 ? null : l4, (8388608 & i) != 0 ? null : list6, (16777216 & i) != 0 ? null : list7, (33554432 & i) != 0 ? null : message, (67108864 & i) != 0 ? null : interaction, (134217728 & i) != 0 ? null : channel, (268435456 & i) != 0 ? null : list8, (536870912 & i) != 0 ? null : messageCall, (1073741824 & i) != 0 ? null : bool4, (i & Integer.MIN_VALUE) != 0 ? false : z2, (i2 & 1) != 0 ? null : messageAllowedMentions, (i2 & 2) != 0 ? null : num2, (i2 & 4) != 0 ? null : l5, (i2 & 8) != 0 ? null : l6, (i2 & 16) != 0 ? null : list9, (i2 & 32) != 0 ? null : captchaPayload); this(j, j2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : user, (i & 16) != 0 ? null : str, (i & 32) != 0 ? null : utcDateTime, (i & 64) != 0 ? null : utcDateTime2, (i & 128) != 0 ? null : bool, (i & 256) != 0 ? null : bool2, (i & 512) != 0 ? null : list, (i & 1024) != 0 ? null : list2, (i & 2048) != 0 ? null : list3, (i & 4096) != 0 ? null : list4, (i & 8192) != 0 ? null : list5, (i & 16384) != 0 ? null : str2, (32768 & i) != 0 ? null : bool3, (65536 & i) != 0 ? null : l2, (131072 & i) != 0 ? null : num, (262144 & i) != 0 ? null : messageActivity, (524288 & i) != 0 ? null : application, (1048576 & i) != 0 ? null : l3, (2097152 & i) != 0 ? null : messageReference, (4194304 & i) != 0 ? null : l4, (8388608 & i) != 0 ? null : list6, (16777216 & i) != 0 ? null : list7, (33554432 & i) != 0 ? null : message, (67108864 & i) != 0 ? null : interaction, (134217728 & i) != 0 ? null : channel, (268435456 & i) != 0 ? null : list8, (536870912 & i) != 0 ? null : messageCall, (1073741824 & i) != 0 ? null : bool4, (i & Integer.MIN_VALUE) != 0 ? false : z2, (i2 & 1) != 0 ? null : messageAllowedMentions, (i2 & 2) != 0 ? null : num2, (i2 & 4) != 0 ? null : l5, (i2 & 8) != 0 ? null : l6, (i2 & 16) != 0 ? null : list9, (i2 & 32) != 0 ? null : str3);
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
@ -138,8 +137,8 @@ public final class Message {
m.checkNotNullParameter(message, "message"); m.checkNotNullParameter(message, "message");
} }
public static /* synthetic */ Message copy$default(Message message, long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message2, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, CaptchaHelper.CaptchaPayload captchaPayload, int i, int i2, Object obj) { public static /* synthetic */ Message copy$default(Message message, long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message2, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, String str3, int i, int i2, Object obj) {
return message.copy((i & 1) != 0 ? message.f2721id : j, (i & 2) != 0 ? message.channelId : j2, (i & 4) != 0 ? message.guildId : l, (i & 8) != 0 ? message.author : user, (i & 16) != 0 ? message.content : str, (i & 32) != 0 ? message.timestamp : utcDateTime, (i & 64) != 0 ? message.editedTimestamp : utcDateTime2, (i & 128) != 0 ? message.tts : bool, (i & 256) != 0 ? message.mentionEveryone : bool2, (i & 512) != 0 ? message.mentions : list, (i & 1024) != 0 ? message.mentionRoles : list2, (i & 2048) != 0 ? message.attachments : list3, (i & 4096) != 0 ? message.embeds : list4, (i & 8192) != 0 ? message.reactions : list5, (i & 16384) != 0 ? message.nonce : str2, (i & 32768) != 0 ? message.pinned : bool3, (i & 65536) != 0 ? message.webhookId : l2, (i & 131072) != 0 ? message.type : num, (i & 262144) != 0 ? message.activity : messageActivity, (i & 524288) != 0 ? message.application : application, (i & 1048576) != 0 ? message.applicationId : l3, (i & 2097152) != 0 ? message.messageReference : messageReference, (i & 4194304) != 0 ? message.flags : l4, (i & 8388608) != 0 ? message.stickers : list6, (i & 16777216) != 0 ? message.stickerItems : list7, (i & 33554432) != 0 ? message.referencedMessage : message2, (i & 67108864) != 0 ? message.interaction : interaction, (i & 134217728) != 0 ? message.thread : channel, (i & 268435456) != 0 ? message.components : list8, (i & 536870912) != 0 ? message.call : messageCall, (i & BasicMeasure.EXACTLY) != 0 ? message.hit : bool4, (i & Integer.MIN_VALUE) != 0 ? message.hasLocalUploads : z2, (i2 & 1) != 0 ? message.allowedMentions : messageAllowedMentions, (i2 & 2) != 0 ? message.numRetries : num2, (i2 & 4) != 0 ? message.lastManualAttemptTimestamp : l5, (i2 & 8) != 0 ? message.initialAttemptTimestamp : l6, (i2 & 16) != 0 ? message.localAttachments : list9, (i2 & 32) != 0 ? message.captchaPayload : captchaPayload); return message.copy((i & 1) != 0 ? message.f2721id : j, (i & 2) != 0 ? message.channelId : j2, (i & 4) != 0 ? message.guildId : l, (i & 8) != 0 ? message.author : user, (i & 16) != 0 ? message.content : str, (i & 32) != 0 ? message.timestamp : utcDateTime, (i & 64) != 0 ? message.editedTimestamp : utcDateTime2, (i & 128) != 0 ? message.tts : bool, (i & 256) != 0 ? message.mentionEveryone : bool2, (i & 512) != 0 ? message.mentions : list, (i & 1024) != 0 ? message.mentionRoles : list2, (i & 2048) != 0 ? message.attachments : list3, (i & 4096) != 0 ? message.embeds : list4, (i & 8192) != 0 ? message.reactions : list5, (i & 16384) != 0 ? message.nonce : str2, (i & 32768) != 0 ? message.pinned : bool3, (i & 65536) != 0 ? message.webhookId : l2, (i & 131072) != 0 ? message.type : num, (i & 262144) != 0 ? message.activity : messageActivity, (i & 524288) != 0 ? message.application : application, (i & 1048576) != 0 ? message.applicationId : l3, (i & 2097152) != 0 ? message.messageReference : messageReference, (i & 4194304) != 0 ? message.flags : l4, (i & 8388608) != 0 ? message.stickers : list6, (i & 16777216) != 0 ? message.stickerItems : list7, (i & 33554432) != 0 ? message.referencedMessage : message2, (i & 67108864) != 0 ? message.interaction : interaction, (i & 134217728) != 0 ? message.thread : channel, (i & 268435456) != 0 ? message.components : list8, (i & 536870912) != 0 ? message.call : messageCall, (i & BasicMeasure.EXACTLY) != 0 ? message.hit : bool4, (i & Integer.MIN_VALUE) != 0 ? message.hasLocalUploads : z2, (i2 & 1) != 0 ? message.allowedMentions : messageAllowedMentions, (i2 & 2) != 0 ? message.numRetries : num2, (i2 & 4) != 0 ? message.lastManualAttemptTimestamp : l5, (i2 & 8) != 0 ? message.initialAttemptTimestamp : l6, (i2 & 16) != 0 ? message.localAttachments : list9, (i2 & 32) != 0 ? message.captchaKey : str3);
} }
public final boolean canResend() { public final boolean canResend() {
@ -271,8 +270,8 @@ public final class Message {
return this.localAttachments; return this.localAttachments;
} }
public final CaptchaHelper.CaptchaPayload component38() { public final String component38() {
return this.captchaPayload; return this.captchaKey;
} }
public final User component4() { public final User component4() {
@ -299,8 +298,8 @@ public final class Message {
return this.mentionEveryone; return this.mentionEveryone;
} }
public final Message copy(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, CaptchaHelper.CaptchaPayload captchaPayload) { public final Message copy(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9, String str3) {
return new Message(j, j2, l, user, str, utcDateTime, utcDateTime2, bool, bool2, list, list2, list3, list4, list5, str2, bool3, l2, num, messageActivity, application, l3, messageReference, l4, list6, list7, message, interaction, channel, list8, messageCall, bool4, z2, messageAllowedMentions, num2, l5, l6, list9, captchaPayload); return new Message(j, j2, l, user, str, utcDateTime, utcDateTime2, bool, bool2, list, list2, list3, list4, list5, str2, bool3, l2, num, messageActivity, application, l3, messageReference, l4, list6, list7, message, interaction, channel, list8, messageCall, bool4, z2, messageAllowedMentions, num2, l5, l6, list9, str3);
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
@ -311,7 +310,7 @@ public final class Message {
return false; return false;
} }
Message message = (Message) obj; Message message = (Message) obj;
return this.f2721id == message.f2721id && this.channelId == message.channelId && m.areEqual(this.guildId, message.guildId) && m.areEqual(this.author, message.author) && m.areEqual(this.content, message.content) && m.areEqual(this.timestamp, message.timestamp) && m.areEqual(this.editedTimestamp, message.editedTimestamp) && m.areEqual(this.tts, message.tts) && m.areEqual(this.mentionEveryone, message.mentionEveryone) && m.areEqual(this.mentions, message.mentions) && m.areEqual(this.mentionRoles, message.mentionRoles) && m.areEqual(this.attachments, message.attachments) && m.areEqual(this.embeds, message.embeds) && m.areEqual(this.reactions, message.reactions) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.pinned, message.pinned) && m.areEqual(this.webhookId, message.webhookId) && m.areEqual(this.type, message.type) && m.areEqual(this.activity, message.activity) && m.areEqual(this.application, message.application) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.flags, message.flags) && m.areEqual(this.stickers, message.stickers) && m.areEqual(this.stickerItems, message.stickerItems) && m.areEqual(this.referencedMessage, message.referencedMessage) && m.areEqual(this.interaction, message.interaction) && m.areEqual(this.thread, message.thread) && m.areEqual(this.components, message.components) && m.areEqual(this.call, message.call) && m.areEqual(this.hit, message.hit) && this.hasLocalUploads == message.hasLocalUploads && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.numRetries, message.numRetries) && m.areEqual(this.lastManualAttemptTimestamp, message.lastManualAttemptTimestamp) && m.areEqual(this.initialAttemptTimestamp, message.initialAttemptTimestamp) && m.areEqual(this.localAttachments, message.localAttachments) && m.areEqual(this.captchaPayload, message.captchaPayload); return this.f2721id == message.f2721id && this.channelId == message.channelId && m.areEqual(this.guildId, message.guildId) && m.areEqual(this.author, message.author) && m.areEqual(this.content, message.content) && m.areEqual(this.timestamp, message.timestamp) && m.areEqual(this.editedTimestamp, message.editedTimestamp) && m.areEqual(this.tts, message.tts) && m.areEqual(this.mentionEveryone, message.mentionEveryone) && m.areEqual(this.mentions, message.mentions) && m.areEqual(this.mentionRoles, message.mentionRoles) && m.areEqual(this.attachments, message.attachments) && m.areEqual(this.embeds, message.embeds) && m.areEqual(this.reactions, message.reactions) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.pinned, message.pinned) && m.areEqual(this.webhookId, message.webhookId) && m.areEqual(this.type, message.type) && m.areEqual(this.activity, message.activity) && m.areEqual(this.application, message.application) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.flags, message.flags) && m.areEqual(this.stickers, message.stickers) && m.areEqual(this.stickerItems, message.stickerItems) && m.areEqual(this.referencedMessage, message.referencedMessage) && m.areEqual(this.interaction, message.interaction) && m.areEqual(this.thread, message.thread) && m.areEqual(this.components, message.components) && m.areEqual(this.call, message.call) && m.areEqual(this.hit, message.hit) && this.hasLocalUploads == message.hasLocalUploads && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.numRetries, message.numRetries) && m.areEqual(this.lastManualAttemptTimestamp, message.lastManualAttemptTimestamp) && m.areEqual(this.initialAttemptTimestamp, message.initialAttemptTimestamp) && m.areEqual(this.localAttachments, message.localAttachments) && m.areEqual(this.captchaKey, message.captchaKey);
} }
public final MessageActivity getActivity() { public final MessageActivity getActivity() {
@ -352,8 +351,8 @@ public final class Message {
return a.g() - utcDateTime.g(); return a.g() - utcDateTime.g();
} }
public final CaptchaHelper.CaptchaPayload getCaptchaPayload() { public final String getCaptchaKey() {
return this.captchaPayload; return this.captchaKey;
} }
public final long getChannelId() { public final long getChannelId() {
@ -606,9 +605,9 @@ public final class Message {
int hashCode33 = (hashCode32 + (l6 != null ? l6.hashCode() : 0)) * 31; int hashCode33 = (hashCode32 + (l6 != null ? l6.hashCode() : 0)) * 31;
List<LocalAttachment> list9 = this.localAttachments; List<LocalAttachment> list9 = this.localAttachments;
int hashCode34 = (hashCode33 + (list9 != null ? list9.hashCode() : 0)) * 31; int hashCode34 = (hashCode33 + (list9 != null ? list9.hashCode() : 0)) * 31;
CaptchaHelper.CaptchaPayload captchaPayload = this.captchaPayload; String str3 = this.captchaKey;
if (captchaPayload != null) { if (str3 != null) {
i = captchaPayload.hashCode(); i = str3.hashCode();
} }
return hashCode34 + i; return hashCode34 + i;
} }
@ -893,9 +892,7 @@ public final class Message {
R.append(this.initialAttemptTimestamp); R.append(this.initialAttemptTimestamp);
R.append(", localAttachments="); R.append(", localAttachments=");
R.append(this.localAttachments); R.append(this.localAttachments);
R.append(", captchaPayload="); R.append(", captchaKey=");
R.append(this.captchaPayload); return a.H(R, this.captchaKey, ")");
R.append(")");
return R.toString();
} }
} }

View File

@ -2143,11 +2143,9 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */ /* compiled from: RestAPIParams.kt */
public static final class InviteCode { public static final class InviteCode {
private final String captchaKey; private final String captchaKey;
private final String captchaRqtoken;
public InviteCode(String str, String str2) { public InviteCode(String str) {
this.captchaKey = str; this.captchaKey = str;
this.captchaRqtoken = str2;
} }
} }
@ -2339,7 +2337,6 @@ public final class RestAPIParams {
private final AllowedMentions allowedMentions; private final AllowedMentions allowedMentions;
private final Long applicationId; private final Long applicationId;
private final String captchaKey; private final String captchaKey;
private final String captchaRqtoken;
private final String content; private final String content;
private final MessageReference messageReference; private final MessageReference messageReference;
private final String nonce; private final String nonce;
@ -2455,7 +2452,7 @@ public final class RestAPIParams {
} }
} }
public Message(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4) { public Message(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3) {
this.content = str; this.content = str;
this.nonce = str2; this.nonce = str2;
this.applicationId = l; this.applicationId = l;
@ -2464,16 +2461,15 @@ public final class RestAPIParams {
this.messageReference = messageReference; this.messageReference = messageReference;
this.allowedMentions = allowedMentions; this.allowedMentions = allowedMentions;
this.captchaKey = str3; this.captchaKey = str3;
this.captchaRqtoken = str4;
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Message(String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4, int i, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ Message(String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : activity, (i & 16) != 0 ? null : list, (i & 32) != 0 ? null : messageReference, (i & 64) != 0 ? null : allowedMentions, (i & 128) != 0 ? null : str3, (i & 256) != 0 ? null : str4); this(str, str2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : activity, (i & 16) != 0 ? null : list, (i & 32) != 0 ? null : messageReference, (i & 64) != 0 ? null : allowedMentions, (i & 128) != 0 ? null : str3);
} }
public static /* synthetic */ Message copy$default(Message message, String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4, int i, Object obj) { public static /* synthetic */ Message copy$default(Message message, String str, String str2, Long l, Activity activity, List list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, int i, Object obj) {
return message.copy((i & 1) != 0 ? message.content : str, (i & 2) != 0 ? message.nonce : str2, (i & 4) != 0 ? message.applicationId : l, (i & 8) != 0 ? message.activity : activity, (i & 16) != 0 ? message.stickerIds : list, (i & 32) != 0 ? message.messageReference : messageReference, (i & 64) != 0 ? message.allowedMentions : allowedMentions, (i & 128) != 0 ? message.captchaKey : str3, (i & 256) != 0 ? message.captchaRqtoken : str4); return message.copy((i & 1) != 0 ? message.content : str, (i & 2) != 0 ? message.nonce : str2, (i & 4) != 0 ? message.applicationId : l, (i & 8) != 0 ? message.activity : activity, (i & 16) != 0 ? message.stickerIds : list, (i & 32) != 0 ? message.messageReference : messageReference, (i & 64) != 0 ? message.allowedMentions : allowedMentions, (i & 128) != 0 ? message.captchaKey : str3);
} }
public final String component1() { public final String component1() {
@ -2508,12 +2504,8 @@ public final class RestAPIParams {
return this.captchaKey; return this.captchaKey;
} }
public final String component9() { public final Message copy(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3) {
return this.captchaRqtoken; return new Message(str, str2, l, activity, list, messageReference, allowedMentions, str3);
}
public final Message copy(String str, String str2, Long l, Activity activity, List<Long> list, MessageReference messageReference, AllowedMentions allowedMentions, String str3, String str4) {
return new Message(str, str2, l, activity, list, messageReference, allowedMentions, str3, str4);
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
@ -2524,7 +2516,7 @@ public final class RestAPIParams {
return false; return false;
} }
Message message = (Message) obj; Message message = (Message) obj;
return m.areEqual(this.content, message.content) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.activity, message.activity) && m.areEqual(this.stickerIds, message.stickerIds) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.captchaKey, message.captchaKey) && m.areEqual(this.captchaRqtoken, message.captchaRqtoken); return m.areEqual(this.content, message.content) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.activity, message.activity) && m.areEqual(this.stickerIds, message.stickerIds) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.captchaKey, message.captchaKey);
} }
public final Activity getActivity() { public final Activity getActivity() {
@ -2543,10 +2535,6 @@ public final class RestAPIParams {
return this.captchaKey; return this.captchaKey;
} }
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public final String getContent() { public final String getContent() {
return this.content; return this.content;
} }
@ -2580,12 +2568,10 @@ public final class RestAPIParams {
AllowedMentions allowedMentions = this.allowedMentions; AllowedMentions allowedMentions = this.allowedMentions;
int hashCode7 = (hashCode6 + (allowedMentions != null ? allowedMentions.hashCode() : 0)) * 31; int hashCode7 = (hashCode6 + (allowedMentions != null ? allowedMentions.hashCode() : 0)) * 31;
String str3 = this.captchaKey; String str3 = this.captchaKey;
int hashCode8 = (hashCode7 + (str3 != null ? str3.hashCode() : 0)) * 31; if (str3 != null) {
String str4 = this.captchaRqtoken; i = str3.hashCode();
if (str4 != null) {
i = str4.hashCode();
} }
return hashCode8 + i; return hashCode7 + i;
} }
public String toString() { public String toString() {
@ -2604,9 +2590,7 @@ public final class RestAPIParams {
R.append(", allowedMentions="); R.append(", allowedMentions=");
R.append(this.allowedMentions); R.append(this.allowedMentions);
R.append(", captchaKey="); R.append(", captchaKey=");
R.append(this.captchaKey); return a.H(R, this.captchaKey, ")");
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
} }
} }
@ -3043,15 +3027,13 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */ /* compiled from: RestAPIParams.kt */
public static final class Phone { public static final class Phone {
private final String captchaKey; private final String captchaKey;
private final String captchaRqtoken;
private final String phone; private final String phone;
private final String source; private final String source;
public Phone(String str, String str2, String str3, String str4) { public Phone(String str, String str2, String str3) {
this.phone = str; this.phone = str;
this.source = str2; this.source = str2;
this.captchaKey = str3; this.captchaKey = str3;
this.captchaRqtoken = str4;
} }
} }
@ -4787,31 +4769,27 @@ public final class RestAPIParams {
/* compiled from: RestAPIParams.kt */ /* compiled from: RestAPIParams.kt */
public static final class UserRelationship { public static final class UserRelationship {
private final String captchaKey; private final String captchaKey;
private final String captchaRqtoken;
private final String friendToken; private final String friendToken;
private final Integer type; private final Integer type;
/* compiled from: RestAPIParams.kt */ /* compiled from: RestAPIParams.kt */
public static final class Add { public static final class Add {
private final String captchaKey; private final String captchaKey;
private final String captchaRqtoken;
private final int discriminator; private final int discriminator;
private final String username; private final String username;
public Add(String str, int i, String str2, String str3) { public Add(String str, int i, String str2) {
m.checkNotNullParameter(str, "username"); m.checkNotNullParameter(str, "username");
this.username = str; this.username = str;
this.discriminator = i; this.discriminator = i;
this.captchaKey = str2; this.captchaKey = str2;
this.captchaRqtoken = str3;
} }
} }
public UserRelationship(Integer num, String str, String str2, String str3) { public UserRelationship(Integer num, String str, String str2) {
this.type = num; this.type = num;
this.friendToken = str; this.friendToken = str;
this.captchaKey = str2; this.captchaKey = str2;
this.captchaRqtoken = str3;
} }
} }

View File

@ -284,7 +284,7 @@ public final class StoreLurking {
if (guild == null || isLurking$app_productionBetaRelease(guild)) { if (guild == null || isLurking$app_productionBetaRelease(guild)) {
this.lurkedGuilds.put(Long.valueOf(j), new LurkContext(j, z2)); this.lurkedGuilds.put(Long.valueOf(j), new LurkContext(j, z2));
this.lurkedGuildsSubject.onNext(this.lurkedGuilds); this.lurkedGuildsSubject.onNext(this.lurkedGuilds);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPIInterface.DefaultImpls.joinGuild$default(RestAPI.Companion.getApi(), j, true, this.sessionId, null, new RestAPIParams.InviteCode(null, null), null, 32, null), false, 1, null)), StoreLurking.class, context, (Function1) null, new StoreLurking$startLurkingInternal$3(this, j), (Function0) null, (Function0) null, new StoreLurking$startLurkingInternal$4(this, j, function3, l), 52, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPIInterface.DefaultImpls.joinGuild$default(RestAPI.Companion.getApi(), j, true, this.sessionId, null, new RestAPIParams.InviteCode(null), null, 32, null), false, 1, null)), StoreLurking.class, context, (Function1) null, new StoreLurking$startLurkingInternal$3(this, j), (Function0) null, (Function0) null, new StoreLurking$startLurkingInternal$4(this, j, function3, l), 52, (Object) null);
return; return;
} }
function3.invoke(guild, l, Boolean.TRUE); function3.invoke(guild, l, Boolean.TRUE);

View File

@ -24,7 +24,6 @@ import com.discord.models.message.Message;
import com.discord.models.user.CoreUser; import com.discord.models.user.CoreUser;
import com.discord.stores.StoreMessagesLoader; import com.discord.stores.StoreMessagesLoader;
import com.discord.utilities.attachments.AttachmentUtilsKt; import com.discord.utilities.attachments.AttachmentUtilsKt;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.logging.Logger; import com.discord.utilities.logging.Logger;
import com.discord.utilities.message.LocalMessageCreatorsKt; import com.discord.utilities.message.LocalMessageCreatorsKt;
import com.discord.utilities.messagesend.MessageQueue; import com.discord.utilities.messagesend.MessageQueue;
@ -290,18 +289,18 @@ public final class StoreMessages extends Store {
ObservableExtensionsKt.appSubscribe$default(h02, StoreMessages.class, (Context) null, (Function1) null, (Function1) null, new StoreMessages$resendAllLocalMessages$1(this), (Function0) null, StoreMessages$resendAllLocalMessages$2.INSTANCE, 46, (Object) null); ObservableExtensionsKt.appSubscribe$default(h02, StoreMessages.class, (Context) null, (Function1) null, (Function1) null, new StoreMessages$resendAllLocalMessages$1(this), (Function0) null, StoreMessages$resendAllLocalMessages$2.INSTANCE, 46, (Object) null);
} }
public static /* synthetic */ Observable resendMessage$default(StoreMessages storeMessages, Message message, boolean z2, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ Observable resendMessage$default(StoreMessages storeMessages, Message message, boolean z2, String str, int i, Object obj) {
if ((i & 2) != 0) { if ((i & 2) != 0) {
z2 = false; z2 = false;
} }
if ((i & 4) != 0) { if ((i & 4) != 0) {
captchaPayload = null; str = null;
} }
return storeMessages.resendMessage(message, z2, captchaPayload); return storeMessages.resendMessage(message, z2, str);
} }
public static /* synthetic */ Observable sendMessage$default(StoreMessages storeMessages, long j, com.discord.models.user.User user, String str, List list, List list2, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ Observable sendMessage$default(StoreMessages storeMessages, long j, com.discord.models.user.User user, String str, List list, List list2, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, String str2, int i, Object obj) {
return storeMessages.sendMessage(j, user, str, list, list2, (i & 32) != 0 ? null : list3, (i & 64) != 0 ? null : messageReference, (i & 128) != 0 ? null : messageAllowedMentions, (i & 256) != 0 ? null : application, (i & 512) != 0 ? null : activity, (i & 1024) != 0 ? null : messageActivity, (i & 2048) != 0 ? null : l, (i & 4096) != 0 ? null : l2, (i & 8192) != 0 ? null : num, (i & 16384) != 0 ? null : captchaPayload); return storeMessages.sendMessage(j, user, str, list, list2, (i & 32) != 0 ? null : list3, (i & 64) != 0 ? null : messageReference, (i & 128) != 0 ? null : messageAllowedMentions, (i & 256) != 0 ? null : application, (i & 512) != 0 ? null : activity, (i & 1024) != 0 ? null : messageActivity, (i & 2048) != 0 ? null : l, (i & 4096) != 0 ? null : l2, (i & 8192) != 0 ? null : num, (i & 16384) != 0 ? null : str2);
} }
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreMessages */ /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.stores.StoreMessages */
@ -634,7 +633,7 @@ public final class StoreMessages extends Store {
return q; return q;
} }
public final Observable<MessageResult> resendMessage(Message message, boolean z2, CaptchaHelper.CaptchaPayload captchaPayload) { public final Observable<MessageResult> resendMessage(Message message, boolean z2, String str) {
ArrayList arrayList; ArrayList arrayList;
ArrayList arrayList2; ArrayList arrayList2;
Integer type; Integer type;
@ -674,28 +673,28 @@ public final class StoreMessages extends Store {
} else { } else {
arrayList2 = null; arrayList2 = null;
} }
return sendMessage$default(this, channelId, coreUser, content, arrayList, arrayList2, null, message.getMessageReference(), message.getAllowedMentions(), null, null, null, z2 ? message.getLastManualAttemptTimestamp() : null, message.getInitialAttemptTimestamp(), Integer.valueOf(intValue + 1), captchaPayload, 1824, null); return sendMessage$default(this, channelId, coreUser, content, arrayList, arrayList2, null, message.getMessageReference(), message.getAllowedMentions(), null, null, null, z2 ? message.getLastManualAttemptTimestamp() : null, message.getInitialAttemptTimestamp(), Integer.valueOf(intValue + 1), str, 1824, null);
} }
throw new IllegalArgumentException("Incorrect " + z2 + " auto attempt and message type " + message.getType()); throw new IllegalArgumentException("Incorrect " + z2 + " auto attempt and message type " + message.getType());
} }
public final void resendMessageWithCaptcha(long j, String str, CaptchaHelper.CaptchaPayload captchaPayload) { public final void resendMessageWithCaptcha(long j, String str, String str2) {
Message message; Message message;
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str2, "captchaKey");
if (str != null && (message = this.localMessagesHolder.getMessage(j, str)) != null) { if (str != null && (message = this.localMessagesHolder.getMessage(j, str)) != null) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(resendMessage(message, true, captchaPayload)), StoreMessages.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, StoreMessages$resendMessageWithCaptcha$1.INSTANCE, 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(resendMessage(message, true, str2)), StoreMessages.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, StoreMessages$resendMessageWithCaptcha$1.INSTANCE, 62, (Object) null);
} }
} }
/* JADX DEBUG: Multi-variable search result rejected for r29v0, resolved type: java.util.List<? extends com.lytefast.flexinput.model.Attachment<?>> */ /* JADX DEBUG: Multi-variable search result rejected for r29v0, resolved type: java.util.List<? extends com.lytefast.flexinput.model.Attachment<?>> */
/* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */ /* JADX WARNING: Unknown variable types count: 1 */
public final Observable<MessageResult> sendMessage(long j, com.discord.models.user.User user, String str, List<? extends com.discord.models.user.User> list, List<? extends Attachment<?>> list2, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, CaptchaHelper.CaptchaPayload captchaPayload) { public final Observable<MessageResult> sendMessage(long j, com.discord.models.user.User user, String str, List<? extends com.discord.models.user.User> list, List<? extends Attachment<?>> list2, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, Application application, Activity activity, MessageActivity messageActivity, Long l, Long l2, Integer num, String str2) {
List list4; List list4;
ArrayList arrayList; ArrayList arrayList;
String str2 = str; String str3 = str;
m.checkNotNullParameter(user, "author"); m.checkNotNullParameter(user, "author");
m.checkNotNullParameter(str2, "content"); m.checkNotNullParameter(str3, "content");
Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef(); Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef();
ref$ObjectRef.element = list2; ref$ObjectRef.element = list2;
int i = 0; int i = 0;
@ -705,7 +704,7 @@ public final class StoreMessages extends Store {
if (context == null) { if (context == null) {
m.throwUninitializedPropertyAccessException("context"); m.throwUninitializedPropertyAccessException("context");
} }
ProcessedMessageContent fromAttachments = companion.fromAttachments(list2, str2, context); ProcessedMessageContent fromAttachments = companion.fromAttachments(list2, str3, context);
List<Attachment<?>> invalidAttachments = fromAttachments.getInvalidAttachments(); List<Attachment<?>> invalidAttachments = fromAttachments.getInvalidAttachments();
if (!invalidAttachments.isEmpty()) { if (!invalidAttachments.isEmpty()) {
User synthesizeApiUser = UserUtils.INSTANCE.synthesizeApiUser(user); User synthesizeApiUser = UserUtils.INSTANCE.synthesizeApiUser(user);
@ -718,10 +717,10 @@ public final class StoreMessages extends Store {
this.dispatcher.schedule(new StoreMessages$sendMessage$1(this, LocalMessageCreatorsKt.createInvalidAttachmentsMessage(j, synthesizeApiUser, clock, arrayList2))); this.dispatcher.schedule(new StoreMessages$sendMessage$1(this, LocalMessageCreatorsKt.createInvalidAttachmentsMessage(j, synthesizeApiUser, clock, arrayList2)));
} }
ref$ObjectRef.element = fromAttachments.getValidAttachments(); ref$ObjectRef.element = fromAttachments.getValidAttachments();
str2 = fromAttachments.getContent(); str3 = fromAttachments.getContent();
List list5 = ref$ObjectRef.element; List list5 = ref$ObjectRef.element;
if (list5 == null || list5.isEmpty()) { if (list5 == null || list5.isEmpty()) {
if (str2.length() == 0) { if (str3.length() == 0) {
Observable<MessageResult> n = Observable.n(StoreMessages$sendMessage$2.INSTANCE, Emitter.BackpressureMode.ERROR); Observable<MessageResult> n = Observable.n(StoreMessages$sendMessage$2.INSTANCE, Emitter.BackpressureMode.ERROR);
m.checkNotNullExpressionValue(n, "Observable.create({ emit…r.BackpressureMode.ERROR)"); m.checkNotNullExpressionValue(n, "Observable.create({ emit…r.BackpressureMode.ERROR)");
return n; return n;
@ -756,7 +755,7 @@ public final class StoreMessages extends Store {
if (num != null) { if (num != null) {
i = num.intValue(); i = num.intValue();
} }
Message createLocalMessage = LocalMessageCreatorsKt.createLocalMessage(str2, j, synthesizeApiUser2, list4, false, z2, application, messageActivity, clock2, arrayList, valueOf, valueOf2, Integer.valueOf(i), list3, messageReference, messageAllowedMentions, captchaPayload); Message createLocalMessage = LocalMessageCreatorsKt.createLocalMessage(str3, j, synthesizeApiUser2, list4, false, z2, application, messageActivity, clock2, arrayList, valueOf, valueOf2, Integer.valueOf(i), list3, messageReference, messageAllowedMentions, str2);
if (messageActivity == null) { if (messageActivity == null) {
this.dispatcher.schedule(new StoreMessages$sendMessage$3(this, createLocalMessage)); this.dispatcher.schedule(new StoreMessages$sendMessage$3(this, createLocalMessage));
} }

View File

@ -15,8 +15,6 @@ import kotlin.jvm.internal.DefaultConstructorMarker;
public final class CaptchaErrorBody implements Serializable { public final class CaptchaErrorBody implements Serializable {
public static final Companion Companion = new Companion(null); public static final Companion Companion = new Companion(null);
private final List<String> captchaKey; private final List<String> captchaKey;
private final String captchaRqdata;
private final String captchaRqtoken;
private final CaptchaService captchaService; private final CaptchaService captchaService;
private final String captchaSitekey; private final String captchaSitekey;
@ -58,17 +56,15 @@ public final class CaptchaErrorBody implements Serializable {
} }
} }
public CaptchaErrorBody(List<String> list, String str, CaptchaService captchaService, String str2, String str3) { public CaptchaErrorBody(List<String> list, String str, CaptchaService captchaService) {
this.captchaKey = list; this.captchaKey = list;
this.captchaSitekey = str; this.captchaSitekey = str;
this.captchaService = captchaService; this.captchaService = captchaService;
this.captchaRqdata = str2;
this.captchaRqtoken = str3;
} }
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: com.discord.utilities.captcha.CaptchaErrorBody */ /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.utilities.captcha.CaptchaErrorBody */
/* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ CaptchaErrorBody copy$default(CaptchaErrorBody captchaErrorBody, List list, String str, CaptchaService captchaService, String str2, String str3, int i, Object obj) { public static /* synthetic */ CaptchaErrorBody copy$default(CaptchaErrorBody captchaErrorBody, List list, String str, CaptchaService captchaService, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
list = captchaErrorBody.captchaKey; list = captchaErrorBody.captchaKey;
} }
@ -78,13 +74,7 @@ public final class CaptchaErrorBody implements Serializable {
if ((i & 4) != 0) { if ((i & 4) != 0) {
captchaService = captchaErrorBody.captchaService; captchaService = captchaErrorBody.captchaService;
} }
if ((i & 8) != 0) { return captchaErrorBody.copy(list, str, captchaService);
str2 = captchaErrorBody.captchaRqdata;
}
if ((i & 16) != 0) {
str3 = captchaErrorBody.captchaRqtoken;
}
return captchaErrorBody.copy(list, str, captchaService, str2, str3);
} }
public final List<String> component1() { public final List<String> component1() {
@ -99,16 +89,8 @@ public final class CaptchaErrorBody implements Serializable {
return this.captchaService; return this.captchaService;
} }
public final String component4() { public final CaptchaErrorBody copy(List<String> list, String str, CaptchaService captchaService) {
return this.captchaRqdata; return new CaptchaErrorBody(list, str, captchaService);
}
public final String component5() {
return this.captchaRqtoken;
}
public final CaptchaErrorBody copy(List<String> list, String str, CaptchaService captchaService, String str2, String str3) {
return new CaptchaErrorBody(list, str, captchaService, str2, str3);
} }
@Override // java.lang.Object @Override // java.lang.Object
@ -120,21 +102,13 @@ public final class CaptchaErrorBody implements Serializable {
return false; return false;
} }
CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) obj; CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) obj;
return m.areEqual(this.captchaKey, captchaErrorBody.captchaKey) && m.areEqual(this.captchaSitekey, captchaErrorBody.captchaSitekey) && m.areEqual(this.captchaService, captchaErrorBody.captchaService) && m.areEqual(this.captchaRqdata, captchaErrorBody.captchaRqdata) && m.areEqual(this.captchaRqtoken, captchaErrorBody.captchaRqtoken); return m.areEqual(this.captchaKey, captchaErrorBody.captchaKey) && m.areEqual(this.captchaSitekey, captchaErrorBody.captchaSitekey) && m.areEqual(this.captchaService, captchaErrorBody.captchaService);
} }
public final List<String> getCaptchaKey() { public final List<String> getCaptchaKey() {
return this.captchaKey; return this.captchaKey;
} }
public final String getCaptchaRqdata() {
return this.captchaRqdata;
}
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public final CaptchaService getCaptchaService() { public final CaptchaService getCaptchaService() {
return this.captchaService; return this.captchaService;
} }
@ -151,14 +125,10 @@ public final class CaptchaErrorBody implements Serializable {
String str = this.captchaSitekey; String str = this.captchaSitekey;
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31; int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
CaptchaService captchaService = this.captchaService; CaptchaService captchaService = this.captchaService;
int hashCode3 = (hashCode2 + (captchaService != null ? captchaService.hashCode() : 0)) * 31; if (captchaService != null) {
String str2 = this.captchaRqdata; i = captchaService.hashCode();
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.captchaRqtoken;
if (str3 != null) {
i = str3.hashCode();
} }
return hashCode4 + i; return hashCode2 + i;
} }
@Override // java.lang.Object @Override // java.lang.Object
@ -169,9 +139,7 @@ public final class CaptchaErrorBody implements Serializable {
R.append(this.captchaSitekey); R.append(this.captchaSitekey);
R.append(", captchaService="); R.append(", captchaService=");
R.append(this.captchaService); R.append(this.captchaService);
R.append(", captchaRqdata="); R.append(")");
R.append(this.captchaRqdata); return R.toString();
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
} }
} }

View File

@ -147,9 +147,6 @@ public final class CaptchaHelper$tryShowCaptcha$1<T> implements Action1<Emitter<
builder.a = siteKey; builder.a = siteKey;
builder.n = StoreStream.Companion.getUserSettingsSystem().getLocale(); builder.n = StoreStream.Companion.getUserSettingsSystem().getLocale();
builder.m = true; builder.m = true;
if (((CaptchaHelper.CaptchaRequest.HCaptcha) this.$captchaRequest).getRqdata() != null) {
builder.f = ((CaptchaHelper.CaptchaRequest.HCaptcha) this.$captchaRequest).getRqdata();
}
Boolean bool = builder.c; Boolean bool = builder.c;
if (!builder.f3115b) { if (!builder.f3115b) {
bool = HCaptchaConfig.access$000(); bool = HCaptchaConfig.access$000();

View File

@ -39,121 +39,33 @@ public final class CaptchaHelper {
private static final String FAILED_MISSING_DEPS = "missing_dependencies"; private static final String FAILED_MISSING_DEPS = "missing_dependencies";
public static final CaptchaHelper INSTANCE = new CaptchaHelper(); public static final CaptchaHelper INSTANCE = new CaptchaHelper();
private static final String RECAPTCHA_SITE_KEY = "6Lff5jIUAAAAAImNXvYYPv2VW2En3Dexy4oX2o4s"; private static final String RECAPTCHA_SITE_KEY = "6Lff5jIUAAAAAImNXvYYPv2VW2En3Dexy4oX2o4s";
private static String captchaRqtoken;
private static String captchaToken; private static String captchaToken;
/* compiled from: CaptchaHelper.kt */
public static final class CaptchaPayload {
private final String captchaKey;
private final String captchaRqtoken;
public CaptchaPayload(String str, String str2) {
m.checkNotNullParameter(str, "captchaKey");
this.captchaKey = str;
this.captchaRqtoken = str2;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ CaptchaPayload(String str, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : str2);
}
public static /* synthetic */ CaptchaPayload copy$default(CaptchaPayload captchaPayload, String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = captchaPayload.captchaKey;
}
if ((i & 2) != 0) {
str2 = captchaPayload.captchaRqtoken;
}
return captchaPayload.copy(str, str2);
}
public final String component1() {
return this.captchaKey;
}
public final String component2() {
return this.captchaRqtoken;
}
public final CaptchaPayload copy(String str, String str2) {
m.checkNotNullParameter(str, "captchaKey");
return new CaptchaPayload(str, str2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CaptchaPayload)) {
return false;
}
CaptchaPayload captchaPayload = (CaptchaPayload) obj;
return m.areEqual(this.captchaKey, captchaPayload.captchaKey) && m.areEqual(this.captchaRqtoken, captchaPayload.captchaRqtoken);
}
public final String getCaptchaKey() {
return this.captchaKey;
}
public final String getCaptchaRqtoken() {
return this.captchaRqtoken;
}
public int hashCode() {
String str = this.captchaKey;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
String str2 = this.captchaRqtoken;
if (str2 != null) {
i = str2.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder R = a.R("CaptchaPayload(captchaKey=");
R.append(this.captchaKey);
R.append(", captchaRqtoken=");
return a.H(R, this.captchaRqtoken, ")");
}
}
/* compiled from: CaptchaHelper.kt */ /* compiled from: CaptchaHelper.kt */
public static abstract class CaptchaRequest { public static abstract class CaptchaRequest {
/* compiled from: CaptchaHelper.kt */ /* compiled from: CaptchaHelper.kt */
public static final class HCaptcha extends CaptchaRequest { public static final class HCaptcha extends CaptchaRequest {
private final Activity activity; private final Activity activity;
private final String rqdata;
private final String siteKey; private final String siteKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public HCaptcha(String str, Activity activity, String str2) { public HCaptcha(String str, Activity activity) {
super(null); super(null);
m.checkNotNullParameter(str, "siteKey"); m.checkNotNullParameter(str, "siteKey");
m.checkNotNullParameter(activity, ActivityChooserModel.ATTRIBUTE_ACTIVITY); m.checkNotNullParameter(activity, ActivityChooserModel.ATTRIBUTE_ACTIVITY);
this.siteKey = str; this.siteKey = str;
this.activity = activity; this.activity = activity;
this.rqdata = str2;
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ public static /* synthetic */ HCaptcha copy$default(HCaptcha hCaptcha, String str, Activity activity, int i, Object obj) {
public /* synthetic */ HCaptcha(String str, Activity activity, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, activity, (i & 4) != 0 ? null : str2);
}
public static /* synthetic */ HCaptcha copy$default(HCaptcha hCaptcha, String str, Activity activity, String str2, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
str = hCaptcha.siteKey; str = hCaptcha.siteKey;
} }
if ((i & 2) != 0) { if ((i & 2) != 0) {
activity = hCaptcha.activity; activity = hCaptcha.activity;
} }
if ((i & 4) != 0) { return hCaptcha.copy(str, activity);
str2 = hCaptcha.rqdata;
}
return hCaptcha.copy(str, activity, str2);
} }
public final String component1() { public final String component1() {
@ -164,14 +76,10 @@ public final class CaptchaHelper {
return this.activity; return this.activity;
} }
public final String component3() { public final HCaptcha copy(String str, Activity activity) {
return this.rqdata;
}
public final HCaptcha copy(String str, Activity activity, String str2) {
m.checkNotNullParameter(str, "siteKey"); m.checkNotNullParameter(str, "siteKey");
m.checkNotNullParameter(activity, ActivityChooserModel.ATTRIBUTE_ACTIVITY); m.checkNotNullParameter(activity, ActivityChooserModel.ATTRIBUTE_ACTIVITY);
return new HCaptcha(str, activity, str2); return new HCaptcha(str, activity);
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
@ -182,17 +90,13 @@ public final class CaptchaHelper {
return false; return false;
} }
HCaptcha hCaptcha = (HCaptcha) obj; HCaptcha hCaptcha = (HCaptcha) obj;
return m.areEqual(this.siteKey, hCaptcha.siteKey) && m.areEqual(this.activity, hCaptcha.activity) && m.areEqual(this.rqdata, hCaptcha.rqdata); return m.areEqual(this.siteKey, hCaptcha.siteKey) && m.areEqual(this.activity, hCaptcha.activity);
} }
public final Activity getActivity() { public final Activity getActivity() {
return this.activity; return this.activity;
} }
public final String getRqdata() {
return this.rqdata;
}
public final String getSiteKey() { public final String getSiteKey() {
return this.siteKey; return this.siteKey;
} }
@ -202,12 +106,10 @@ public final class CaptchaHelper {
int i = 0; int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31; int hashCode = (str != null ? str.hashCode() : 0) * 31;
Activity activity = this.activity; Activity activity = this.activity;
int hashCode2 = (hashCode + (activity != null ? activity.hashCode() : 0)) * 31; if (activity != null) {
String str2 = this.rqdata; i = activity.hashCode();
if (str2 != null) {
i = str2.hashCode();
} }
return hashCode2 + i; return hashCode + i;
} }
public String toString() { public String toString() {
@ -215,8 +117,8 @@ public final class CaptchaHelper {
R.append(this.siteKey); R.append(this.siteKey);
R.append(", activity="); R.append(", activity=");
R.append(this.activity); R.append(this.activity);
R.append(", rqdata="); R.append(")");
return a.H(R, this.rqdata, ")"); return R.toString();
} }
} }
@ -412,18 +314,10 @@ public final class CaptchaHelper {
captchaHelper.showCaptchaHelpDialog(appActivity, function0); captchaHelper.showCaptchaHelpDialog(appActivity, function0);
} }
public final String getCaptchaRqtoken() {
return captchaRqtoken;
}
public final String getCaptchaToken() { public final String getCaptchaToken() {
return captchaToken; return captchaToken;
} }
public final void setCaptchaRqtoken(String str) {
captchaRqtoken = str;
}
public final void setCaptchaToken(String str) { public final void setCaptchaToken(String str) {
captchaToken = str; captchaToken = str;
} }

View File

@ -1,7 +1,6 @@
package com.discord.utilities.guilds; package com.discord.utilities.guilds;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.guilds.invite.InviteJoinHelper; import com.discord.widgets.guilds.invite.InviteJoinHelper;
import com.discord.widgets.guilds.join.InviteArgs; import com.discord.widgets.guilds.join.InviteArgs;
import d0.z.d.m; import d0.z.d.m;
@ -9,7 +8,7 @@ import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function2;
/* compiled from: GuildCaptchaUtils.kt */ /* compiled from: GuildCaptchaUtils.kt */
public final class GuildCaptchaUtilsKt$handleHttpException$1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public final class GuildCaptchaUtilsKt$handleHttpException$1 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ InviteArgs $args; public final /* synthetic */ InviteArgs $args;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -21,14 +20,14 @@ public final class GuildCaptchaUtilsKt$handleHttpException$1 extends o implement
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "newFragment"); m.checkNotNullParameter(appFragment, "newFragment");
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "captchaToken");
InviteJoinHelper.INSTANCE.joinViaInvite(this.$args.getInvite(), this.$args.getJavaClass(), appFragment, this.$args.getLocation(), this.$args.getOnInvitePostError(), this.$args.getOnInvitePostSuccess(), this.$args.getOnInviteFlowFinished(), captchaPayload); InviteJoinHelper.INSTANCE.joinViaInvite(this.$args.getInvite(), this.$args.getJavaClass(), appFragment, this.$args.getLocation(), this.$args.getOnInvitePostError(), this.$args.getOnInvitePostSuccess(), this.$args.getOnInviteFlowFinished(), str);
} }
} }

View File

@ -2,7 +2,6 @@ package com.discord.utilities.guilds;
import android.content.Context; import android.content.Context;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.guilds.join.GuildJoinHelperKt; import com.discord.widgets.guilds.join.GuildJoinHelperKt;
import com.discord.widgets.guilds.join.JoinArgs; import com.discord.widgets.guilds.join.JoinArgs;
import d0.z.d.m; import d0.z.d.m;
@ -10,7 +9,7 @@ import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function2;
/* compiled from: GuildCaptchaUtils.kt */ /* compiled from: GuildCaptchaUtils.kt */
public final class GuildCaptchaUtilsKt$handleHttpException$2 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public final class GuildCaptchaUtilsKt$handleHttpException$2 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ JoinArgs $args; public final /* synthetic */ JoinArgs $args;
public final /* synthetic */ Context $context; public final /* synthetic */ Context $context;
@ -24,14 +23,14 @@ public final class GuildCaptchaUtilsKt$handleHttpException$2 extends o implement
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>"); m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(captchaPayload, "captchaToken"); m.checkNotNullParameter(str, "captchaToken");
GuildJoinHelperKt.joinGuild$default(this.$context, this.$args.getGuildId(), this.$args.isLurker(), this.$args.getSessionId(), this.$args.getDirectoryChannelId(), null, this.$args.getErrorClass(), this.$args.getSubscriptionHandler(), this.$args.getErrorHandler(), captchaPayload, this.$args.getOnNext(), 32, null); GuildJoinHelperKt.joinGuild$default(this.$context, this.$args.getGuildId(), this.$args.isLurker(), this.$args.getSessionId(), this.$args.getDirectoryChannelId(), null, this.$args.getErrorClass(), this.$args.getSubscriptionHandler(), this.$args.getErrorHandler(), str, this.$args.getOnNext(), 32, null);
} }
} }

View File

@ -12,7 +12,6 @@ import com.discord.api.user.User;
import com.discord.api.utcdatetime.UtcDateTime; import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.models.domain.NonceGenerator; import com.discord.models.domain.NonceGenerator;
import com.discord.models.message.Message; import com.discord.models.message.Message;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.time.Clock; import com.discord.utilities.time.Clock;
import d0.t.n; import d0.t.n;
import d0.t.o; import d0.t.o;
@ -56,7 +55,7 @@ public final class LocalMessageCreatorsKt {
return createLocalApplicationCommandMessage(id2, b2, channelId, c, author, z2, z3, l, clock); return createLocalApplicationCommandMessage(id2, b2, channelId, c, author, z2, z3, l, clock);
} }
public static final Message createLocalMessage(String str, long j, User user, List<User> list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List<LocalAttachment> list2, Long l, Long l2, Integer num, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, CaptchaHelper.CaptchaPayload captchaPayload) { public static final Message createLocalMessage(String str, long j, User user, List<User> list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List<LocalAttachment> list2, Long l, Long l2, Integer num, List<? extends BaseSticker> list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, String str2) {
ArrayList arrayList; ArrayList arrayList;
m.checkNotNullParameter(str, "content"); m.checkNotNullParameter(str, "content");
m.checkNotNullParameter(user, "author"); m.checkNotNullParameter(user, "author");
@ -79,11 +78,11 @@ public final class LocalMessageCreatorsKt {
} else { } else {
arrayList = null; arrayList = null;
} }
return new Message(computeNonce, j, null, user, str, utcDateTime, null, bool, bool, list, emptyList, emptyList2, emptyList3, emptyList4, valueOf, bool, null, valueOf2, messageActivity, application, null, messageReference, null, null, arrayList, null, null, null, null, null, Boolean.FALSE, z3, messageAllowedMentions, num, l, l2, list2, captchaPayload, 4, 0, null); return new Message(computeNonce, j, null, user, str, utcDateTime, null, bool, bool, list, emptyList, emptyList2, emptyList3, emptyList4, valueOf, bool, null, valueOf2, messageActivity, application, null, messageReference, null, null, arrayList, null, null, null, null, null, Boolean.FALSE, z3, messageAllowedMentions, num, l, l2, list2, str2, 4, 0, null);
} }
public static /* synthetic */ Message createLocalMessage$default(String str, long j, User user, List list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List list2, Long l, Long l2, Integer num, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ Message createLocalMessage$default(String str, long j, User user, List list, boolean z2, boolean z3, Application application, MessageActivity messageActivity, Clock clock, List list2, Long l, Long l2, Integer num, List list3, MessageReference messageReference, MessageAllowedMentions messageAllowedMentions, String str2, int i, Object obj) {
return createLocalMessage(str, j, user, list, z2, z3, application, messageActivity, clock, list2, l, l2, num, list3, messageReference, messageAllowedMentions, (i & 65536) != 0 ? null : captchaPayload); return createLocalMessage(str, j, user, list, z2, z3, application, messageActivity, clock, list2, l, l2, num, list3, messageReference, messageAllowedMentions, (i & 65536) != 0 ? null : str2);
} }
public static final Message createThreadStarterMessageNotFoundMessage(long j, User user, Clock clock) { public static final Message createThreadStarterMessageNotFoundMessage(long j, User user, Clock clock) {

View File

@ -168,18 +168,12 @@ public final class MessageQueue {
long messageId = edit.getMessageId(); long messageId = edit.getMessageId();
String content = edit.getContent(); String content = edit.getContent();
MessageAllowedMentions allowedMentions = edit.getAllowedMentions(); MessageAllowedMentions allowedMentions = edit.getAllowedMentions();
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(api.editMessage(channelId, messageId, new RestAPIParams.Message(content, null, null, null, null, null, allowedMentions != null ? RestAPIParams.Message.AllowedMentions.Companion.create(allowedMentions) : null, null, null, 444, null)), false), MessageQueue.class, (Context) null, new MessageQueue$doEdit$4(this, edit, drainListener), new MessageQueue$doEdit$3(this, drainListener), (Function0) null, (Function0) null, new MessageQueue$doEdit$2(this, drainListener), 50, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(api.editMessage(channelId, messageId, new RestAPIParams.Message(content, null, null, null, null, null, allowedMentions != null ? RestAPIParams.Message.AllowedMentions.Companion.create(allowedMentions) : null, null, 188, null)), false), MessageQueue.class, (Context) null, new MessageQueue$doEdit$4(this, edit, drainListener), new MessageQueue$doEdit$3(this, drainListener), (Function0) null, (Function0) null, new MessageQueue$doEdit$2(this, drainListener), 50, (Object) null);
} }
/* JADX WARNING: Removed duplicated region for block: B:46:0x00f1 */
/* JADX WARNING: Removed duplicated region for block: B:47:0x00f8 */
/* JADX WARNING: Removed duplicated region for block: B:50:0x0100 */
private final void doSend(MessageRequest.Send send, DrainListener drainListener) { private final void doSend(MessageRequest.Send send, DrainListener drainListener) {
RestAPIParams.Message.Activity activity; RestAPIParams.Message.Activity activity;
RestAPIParams.Message.MessageReference messageReference; RestAPIParams.Message.MessageReference messageReference;
ArrayList arrayList;
CaptchaHelper.CaptchaPayload captchaPayload;
ArrayList arrayList2;
String k; String k;
MessageResult.ValidationError validateMessage = send.validateMessage(); MessageResult.ValidationError validateMessage = send.validateMessage();
if (validateMessage != null) { if (validateMessage != null) {
@ -189,7 +183,7 @@ public final class MessageQueue {
Message message = send.getMessage(); Message message = send.getMessage();
boolean z2 = message.getNonce() != null; boolean z2 = message.getNonce() != null;
MessageActivity activity2 = message.getActivity(); MessageActivity activity2 = message.getActivity();
String str = null; ArrayList arrayList = null;
if (activity2 != null) { if (activity2 != null) {
Activity activity3 = send.getActivity(); Activity activity3 = send.getActivity();
activity = (activity3 == null || (k = activity3.k()) == null) ? null : new RestAPIParams.Message.Activity(activity2.b(), activity2.a(), k); activity = (activity3 == null || (k = activity3.k()) == null) ? null : new RestAPIParams.Message.Activity(activity2.b(), activity2.a(), k);
@ -213,42 +207,20 @@ public final class MessageQueue {
Long valueOf = application != null ? Long.valueOf(application.g()) : null; Long valueOf = application != null ? Long.valueOf(application.g()) : null;
List<StickerPartial> stickerItems = message.getStickerItems(); List<StickerPartial> stickerItems = message.getStickerItems();
if (stickerItems != null) { if (stickerItems != null) {
arrayList2 = new ArrayList(o.collectionSizeOrDefault(stickerItems, 10)); arrayList = new ArrayList(o.collectionSizeOrDefault(stickerItems, 10));
for (StickerPartial stickerPartial : stickerItems) { for (StickerPartial stickerPartial : stickerItems) {
arrayList2.add(Long.valueOf(stickerPartial.getId())); arrayList.add(Long.valueOf(stickerPartial.getId()));
} }
} else { } else {
List<Sticker> stickers = message.getStickers(); List<Sticker> stickers = message.getStickers();
if (stickers != null) { if (stickers != null) {
arrayList2 = new ArrayList(o.collectionSizeOrDefault(stickers, 10)); arrayList = new ArrayList(o.collectionSizeOrDefault(stickers, 10));
for (Sticker sticker : stickers) { for (Sticker sticker : stickers) {
arrayList2.add(Long.valueOf(sticker.getId())); arrayList.add(Long.valueOf(sticker.getId()));
} }
} else {
arrayList = null;
CaptchaHelper.CaptchaPayload captchaPayload2 = message.getCaptchaPayload();
String captchaKey = captchaPayload2 == null ? captchaPayload2.getCaptchaKey() : null;
captchaPayload = message.getCaptchaPayload();
if (captchaPayload != null) {
str = captchaPayload.getCaptchaRqtoken();
}
Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendPayload(this.contentResolver, new RestAPIParams.Message(content, nonce, valueOf, activity, arrayList, messageReference, create, captchaKey, str), send.getAttachments()).t(new MessageQueue$doSend$1(send));
m.checkNotNullExpressionValue(t, "SendUtils\n .getSe… }\n }\n }");
Observable<R> F = t.x(MessageQueue$doSend$$inlined$filterIs$1.INSTANCE).F(MessageQueue$doSend$$inlined$filterIs$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it is T }.map { it as T }");
Observable z3 = F.Z(1).z(new MessageQueue$doSend$2(message));
m.checkNotNullExpressionValue(z3, "SendUtils\n .getSe…ge)\n }\n }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn(z3, z2), MessageQueue.class, (Context) null, new MessageQueue$doSend$5(this, send, drainListener), new MessageQueue$doSend$4(this, drainListener, message), (Function0) null, (Function0) null, new MessageQueue$doSend$3(this, drainListener), 50, (Object) null);
} }
} }
arrayList = arrayList2; Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendPayload(this.contentResolver, new RestAPIParams.Message(content, nonce, valueOf, activity, arrayList, messageReference, create, message.getCaptchaKey()), send.getAttachments()).t(new MessageQueue$doSend$1(send));
CaptchaHelper.CaptchaPayload captchaPayload2 = message.getCaptchaPayload();
if (captchaPayload2 == null) {
}
captchaPayload = message.getCaptchaPayload();
if (captchaPayload != null) {
}
Observable<SendUtils.SendPayload> t = SendUtils.INSTANCE.getSendPayload(this.contentResolver, new RestAPIParams.Message(content, nonce, valueOf, activity, arrayList, messageReference, create, captchaKey, str), send.getAttachments()).t(new MessageQueue$doSend$1(send));
m.checkNotNullExpressionValue(t, "SendUtils\n .getSe… }\n }\n }"); m.checkNotNullExpressionValue(t, "SendUtils\n .getSe… }\n }\n }");
Observable<R> F = t.x(MessageQueue$doSend$$inlined$filterIs$1.INSTANCE).F(MessageQueue$doSend$$inlined$filterIs$2.INSTANCE); Observable<R> F = t.x(MessageQueue$doSend$$inlined$filterIs$1.INSTANCE).F(MessageQueue$doSend$$inlined$filterIs$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it is T }.map { it as T }"); m.checkNotNullExpressionValue(F, "filter { it is T }.map { it as T }");

View File

@ -118,7 +118,6 @@ import com.discord.restapi.SpotifyTokenInterceptor;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.ChatInputComponentTypes; import com.discord.utilities.analytics.ChatInputComponentTypes;
import com.discord.utilities.auth.GoogleSmartLockManager; import com.discord.utilities.auth.GoogleSmartLockManager;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.logging.Logger; import com.discord.utilities.logging.Logger;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.systemlog.SystemLogUtils; import com.discord.utilities.systemlog.SystemLogUtils;
@ -434,8 +433,8 @@ public final class RestAPI implements RestAPIInterface {
apiSpotify = restAPI; apiSpotify = restAPI;
} }
public static /* synthetic */ Observable addRelationship$default(RestAPI restAPI, String str, long j, Integer num, String str2, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ Observable addRelationship$default(RestAPI restAPI, String str, long j, Integer num, String str2, String str3, int i, Object obj) {
return restAPI.addRelationship(str, j, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : captchaPayload); return restAPI.addRelationship(str, j, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : str3);
} }
public static final Interceptor buildAnalyticsInterceptor() { public static final Interceptor buildAnalyticsInterceptor() {
@ -596,9 +595,9 @@ public final class RestAPI implements RestAPIInterface {
return this._api.addRelationship(j, userRelationship, str); return this._api.addRelationship(j, userRelationship, str);
} }
public final Observable<Void> addRelationship(String str, long j, Integer num, String str2, CaptchaHelper.CaptchaPayload captchaPayload) { public final Observable<Void> addRelationship(String str, long j, Integer num, String str2, String str3) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION); m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
return ObservableExtensionsKt.restSubscribeOn$default(this._api.addRelationship(j, new RestAPIParams.UserRelationship(num, str2, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null); return ObservableExtensionsKt.restSubscribeOn$default(this._api.addRelationship(j, new RestAPIParams.UserRelationship(num, str2, str3), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
} }
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@ -2124,10 +2123,10 @@ public final class RestAPI implements RestAPIInterface {
return this._api.sendRelationshipRequest(add, str); return this._api.sendRelationshipRequest(add, str);
} }
public final Observable<Void> sendRelationshipRequest(String str, String str2, int i, CaptchaHelper.CaptchaPayload captchaPayload) { public final Observable<Void> sendRelationshipRequest(String str, String str2, int i, String str3) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION); m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
m.checkNotNullParameter(str2, "username"); m.checkNotNullParameter(str2, "username");
return ObservableExtensionsKt.restSubscribeOn$default(this._api.sendRelationshipRequest(new RestAPIParams.UserRelationship.Add(str2, i, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null); return ObservableExtensionsKt.restSubscribeOn$default(this._api.sendRelationshipRequest(new RestAPIParams.UserRelationship.Add(str2, i, str3), jsonObjectOf(d0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
} }
public final Observable<Void> setConsent(boolean z2, String str) { public final Observable<Void> setConsent(boolean z2, String str) {

View File

@ -2,14 +2,13 @@ package com.discord.utilities.rest;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.messagesend.MessageResult; import com.discord.utilities.messagesend.MessageResult;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function2;
/* compiled from: SendUtils.kt */ /* compiled from: SendUtils.kt */
public final class SendUtils$handleCaptchaRequired$1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public final class SendUtils$handleCaptchaRequired$1 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ MessageResult.CaptchaRequired $messageResult; public final /* synthetic */ MessageResult.CaptchaRequired $messageResult;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -21,14 +20,14 @@ public final class SendUtils$handleCaptchaRequired$1 extends o implements Functi
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>"); m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(captchaPayload, "captchaToken"); m.checkNotNullParameter(str, "captchaToken");
StoreStream.Companion.getMessages().resendMessageWithCaptcha(this.$messageResult.getChannelId(), this.$messageResult.getNonce(), captchaPayload); StoreStream.Companion.getMessages().resendMessageWithCaptcha(this.$messageResult.getChannelId(), this.$messageResult.getNonce(), str);
} }
} }

View File

@ -544,8 +544,6 @@ public final class SendUtils {
} }
public final Observable<SendPayload> getSendPayload(ContentResolver contentResolver, RestAPIParams.Message message, List<? extends Attachment<?>> list) { public final Observable<SendPayload> getSendPayload(ContentResolver contentResolver, RestAPIParams.Message message, List<? extends Attachment<?>> list) {
String str;
List<Attachment<?>> list2;
RestAPIParams.Message message2 = message; RestAPIParams.Message message2 = message;
m.checkNotNullParameter(contentResolver, "contentResolver"); m.checkNotNullParameter(contentResolver, "contentResolver");
m.checkNotNullParameter(message2, "apiParamMessage"); m.checkNotNullParameter(message2, "apiParamMessage");
@ -561,14 +559,9 @@ public final class SendUtils {
} }
String appendLinks = AttachmentUtilsKt.appendLinks(content, extractLinks); String appendLinks = AttachmentUtilsKt.appendLinks(content, extractLinks);
if (!m.areEqual(appendLinks, message.getContent())) { if (!m.areEqual(appendLinks, message.getContent())) {
str = "Observable.just(SendPayl…ramMessage, emptyList()))"; message2 = RestAPIParams.Message.copy$default(message, appendLinks, null, null, null, null, null, null, null, 254, null);
list2 = extractLinks;
message2 = RestAPIParams.Message.copy$default(message, appendLinks, null, null, null, null, null, null, null, null, 510, null);
} else {
str = "Observable.just(SendPayl…ramMessage, emptyList()))";
list2 = extractLinks;
} }
List<Attachment<?>> uniqueifyNames = uniqueifyNames(u.minus((Iterable) list, (Iterable) list2)); List<Attachment<?>> uniqueifyNames = uniqueifyNames(u.minus((Iterable) list, (Iterable) extractLinks));
if (!uniqueifyNames.isEmpty()) { if (!uniqueifyNames.isEmpty()) {
k kVar2 = new k(getPreprocessingFromAttachments(contentResolver, uniqueifyNames)); k kVar2 = new k(getPreprocessingFromAttachments(contentResolver, uniqueifyNames));
ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(uniqueifyNames, 10)); ArrayList arrayList = new ArrayList(d0.t.o.collectionSizeOrDefault(uniqueifyNames, 10));
@ -586,7 +579,7 @@ public final class SendUtils {
return m; return m;
} }
k kVar3 = new k(new SendPayload.ReadyToSend(message2, d0.t.n.emptyList())); k kVar3 = new k(new SendPayload.ReadyToSend(message2, d0.t.n.emptyList()));
m.checkNotNullExpressionValue(kVar3, str); m.checkNotNullExpressionValue(kVar3, "Observable.just(SendPayl…ramMessage, emptyList()))");
return kVar3; return kVar3;
} }

View File

@ -3,7 +3,6 @@ package com.discord.widgets.captcha;
import android.content.Intent; import android.content.Intent;
import androidx.activity.result.ActivityResult; import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback; import androidx.activity.result.ActivityResultCallback;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetCaptcha.kt */ /* compiled from: WidgetCaptcha.kt */
@ -18,14 +17,9 @@ public final class WidgetCaptcha$Companion$registerForResult$1<O> implements Act
m.checkNotNullExpressionValue(activityResult, "activityResult"); m.checkNotNullExpressionValue(activityResult, "activityResult");
if (activityResult.getResultCode() == -1) { if (activityResult.getResultCode() == -1) {
Intent data = activityResult.getData(); Intent data = activityResult.getData();
String str = null; String stringExtra = data != null ? data.getStringExtra("RESULT_EXTRA_CAPTCHA") : null;
String stringExtra = data != null ? data.getStringExtra("RESULT_EXTRA_TOKEN") : null;
Intent data2 = activityResult.getData();
if (data2 != null) {
str = data2.getStringExtra("RESULT_EXTRA_RQTOKEN");
}
if (stringExtra != null) { if (stringExtra != null) {
this.$callback.invoke(new CaptchaHelper.CaptchaPayload(stringExtra, str)); this.$callback.invoke(stringExtra);
} }
} }
} }

View File

@ -31,8 +31,7 @@ public class WidgetCaptcha extends AppFragment {
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(WidgetCaptcha.class, "binding", "getBinding()Lcom/discord/databinding/WidgetCaptchaBinding;", 0)}; public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(WidgetCaptcha.class, "binding", "getBinding()Lcom/discord/databinding/WidgetCaptchaBinding;", 0)};
public static final Companion Companion = new Companion(null); public static final Companion Companion = new Companion(null);
private static final String EXTRA_CAPTCHA_ERROR_BODY = "EXTRA_CAPTCHA_ERROR_BODY"; private static final String EXTRA_CAPTCHA_ERROR_BODY = "EXTRA_CAPTCHA_ERROR_BODY";
private static final String RESULT_EXTRA_RQTOKEN = "RESULT_EXTRA_RQTOKEN"; private static final String RESULT_EXTRA_TOKEN = "RESULT_EXTRA_CAPTCHA";
private static final String RESULT_EXTRA_TOKEN = "RESULT_EXTRA_TOKEN";
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetCaptcha$binding$2.INSTANCE, null, 2, null); private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetCaptcha$binding$2.INSTANCE, null, 2, null);
/* compiled from: WidgetCaptcha.kt */ /* compiled from: WidgetCaptcha.kt */
@ -63,7 +62,7 @@ public class WidgetCaptcha extends AppFragment {
} }
} }
public final ActivityResultLauncher<Intent> registerForResult(AppFragment appFragment, Function1<? super CaptchaHelper.CaptchaPayload, Unit> function1) { public final ActivityResultLauncher<Intent> registerForResult(AppFragment appFragment, Function1<? super String, Unit> function1) {
m.checkNotNullParameter(appFragment, "fragment"); m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(function1, "callback"); m.checkNotNullParameter(function1, "callback");
ActivityResultLauncher<Intent> registerForActivityResult = appFragment.registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new WidgetCaptcha$Companion$registerForResult$1(function1)); ActivityResultLauncher<Intent> registerForActivityResult = appFragment.registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new WidgetCaptcha$Companion$registerForResult$1(function1));
@ -84,13 +83,10 @@ public class WidgetCaptcha extends AppFragment {
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE; CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
String captchaToken = captchaHelper.getCaptchaToken(); String captchaToken = captchaHelper.getCaptchaToken();
if (captchaToken != null) { if (captchaToken != null) {
String captchaRqtoken = captchaHelper.getCaptchaRqtoken();
captchaHelper.setCaptchaToken(null); captchaHelper.setCaptchaToken(null);
captchaHelper.setCaptchaRqtoken(null);
trackTransition$default(this, "submitted", null, 2, null); trackTransition$default(this, "submitted", null, 2, null);
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra(RESULT_EXTRA_TOKEN, captchaToken); intent.putExtra(RESULT_EXTRA_TOKEN, captchaToken);
intent.putExtra(RESULT_EXTRA_RQTOKEN, captchaRqtoken);
activity.setResult(-1, intent); activity.setResult(-1, intent);
activity.finish(); activity.finish();
} }
@ -131,8 +127,6 @@ public class WidgetCaptcha extends AppFragment {
CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) serializableExtra; CaptchaErrorBody captchaErrorBody = (CaptchaErrorBody) serializableExtra;
String captchaSitekey = captchaErrorBody != null ? captchaErrorBody.getCaptchaSitekey() : null; String captchaSitekey = captchaErrorBody != null ? captchaErrorBody.getCaptchaSitekey() : null;
CaptchaService captchaService = captchaErrorBody != null ? captchaErrorBody.getCaptchaService() : null; CaptchaService captchaService = captchaErrorBody != null ? captchaErrorBody.getCaptchaService() : null;
String captchaRqdata = captchaErrorBody != null ? captchaErrorBody.getCaptchaRqdata() : null;
CaptchaHelper.INSTANCE.setCaptchaRqtoken(captchaErrorBody != null ? captchaErrorBody.getCaptchaRqtoken() : null);
if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) { if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) {
FragmentActivity requireActivity = requireActivity(); FragmentActivity requireActivity = requireActivity();
m.checkNotNullExpressionValue(requireActivity, "requireActivity()"); m.checkNotNullExpressionValue(requireActivity, "requireActivity()");
@ -140,7 +134,7 @@ public class WidgetCaptcha extends AppFragment {
} else { } else {
FragmentActivity requireActivity2 = requireActivity(); FragmentActivity requireActivity2 = requireActivity();
m.checkNotNullExpressionValue(requireActivity2, "requireActivity()"); m.checkNotNullExpressionValue(requireActivity2, "requireActivity()");
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2, captchaRqdata); captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2);
} }
String string = captchaRequest instanceof CaptchaHelper.CaptchaRequest.HCaptcha ? getString(R.string.verify_by_hcaptcha) : getString(R.string.verify_by_recaptcha); String string = captchaRequest instanceof CaptchaHelper.CaptchaRequest.HCaptcha ? getString(R.string.verify_by_hcaptcha) : getString(R.string.verify_by_recaptcha);
m.checkNotNullExpressionValue(string, "when (captchaRequest) {\n…erify_by_recaptcha)\n }"); m.checkNotNullExpressionValue(string, "when (captchaRequest) {\n…erify_by_recaptcha)\n }");

View File

@ -21,7 +21,7 @@ import kotlin.jvm.functions.Function2;
public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 extends o implements Function1<FragmentActivity, Boolean> { public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 extends o implements Function1<FragmentActivity, Boolean> {
public final /* synthetic */ CaptchaErrorBody $error; public final /* synthetic */ CaptchaErrorBody $error;
public final /* synthetic */ Function0 $onCaptchaAttemptFailed; public final /* synthetic */ Function0 $onCaptchaAttemptFailed;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived; public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ String $requestKey; public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -30,7 +30,7 @@ public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 ex
this.$requestKey = str; this.$requestKey = str;
this.$error = captchaErrorBody; this.$error = captchaErrorBody;
this.$onCaptchaAttemptFailed = function0; this.$onCaptchaAttemptFailed = function0;
this.$onCaptchaPayloadReceived = function2; this.$onCaptchaTokenReceived = function2;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -67,7 +67,7 @@ public final class WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1 ex
if (fragment == null) { if (fragment == null) {
return true; return true;
} }
WidgetCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaPayloadReceived); WidgetCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaTokenReceived);
return true; return true;
} }
} }

View File

@ -2,7 +2,6 @@ package com.discord.widgets.captcha;
import android.os.Bundle; import android.os.Bundle;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
@ -10,14 +9,14 @@ import kotlin.jvm.functions.Function2;
/* compiled from: WidgetCaptchaBottomSheet.kt */ /* compiled from: WidgetCaptchaBottomSheet.kt */
public final class WidgetCaptchaBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> { public final class WidgetCaptchaBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> {
public final /* synthetic */ AppFragment $fragment; public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived; public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ String $requestKey; public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetCaptchaBottomSheet$Companion$registerForResult$1(String str, Function2 function2, AppFragment appFragment) { public WidgetCaptchaBottomSheet$Companion$registerForResult$1(String str, Function2 function2, AppFragment appFragment) {
super(2); super(2);
this.$requestKey = str; this.$requestKey = str;
this.$onCaptchaPayloadReceived = function2; this.$onCaptchaTokenReceived = function2;
this.$fragment = appFragment; this.$fragment = appFragment;
} }
@ -30,14 +29,11 @@ public final class WidgetCaptchaBottomSheet$Companion$registerForResult$1 extend
} }
public final void invoke(String str, Bundle bundle) { public final void invoke(String str, Bundle bundle) {
String string;
m.checkNotNullParameter(str, "resultRequestKey"); m.checkNotNullParameter(str, "resultRequestKey");
m.checkNotNullParameter(bundle, "bundle"); m.checkNotNullParameter(bundle, "bundle");
if (m.areEqual(this.$requestKey, str)) { if (m.areEqual(this.$requestKey, str) && (string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", "")) != null && (!m.areEqual(string, ""))) {
String string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", ""); this.$onCaptchaTokenReceived.invoke(this.$fragment, string);
String string2 = bundle.getString("INTENT_EXTRA_CAPTCHA_RQTOKEN", "");
if (string != null && (!m.areEqual(string, ""))) {
this.$onCaptchaPayloadReceived.invoke(this.$fragment, new CaptchaHelper.CaptchaPayload(string, string2));
}
} }
} }
} }

View File

@ -47,7 +47,6 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
private static final String ARG_REQUEST_KEY = "INTENT_EXTRA_REQUEST_CODE"; private static final String ARG_REQUEST_KEY = "INTENT_EXTRA_REQUEST_CODE";
public static final Companion Companion = new Companion(null); public static final Companion Companion = new Companion(null);
private static final String NOTICE_NAME = "captcha notice"; private static final String NOTICE_NAME = "captcha notice";
private static final String RESULT_EXTRA_CAPTCHA_RQTOKEN = "INTENT_EXTRA_CAPTCHA_RQTOKEN";
private static final String RESULT_EXTRA_CAPTCHA_TOKEN = "INTENT_EXTRA_CAPTCHA_TOKEN"; private static final String RESULT_EXTRA_CAPTCHA_TOKEN = "INTENT_EXTRA_CAPTCHA_TOKEN";
private static final List<c<? extends AppFragment>> resolvableFragments = n.listOf((Object[]) new c[]{a0.getOrCreateKotlinClass(WidgetTabsHost.class), a0.getOrCreateKotlinClass(WidgetIncomingShare.class)}); private static final List<c<? extends AppFragment>> resolvableFragments = n.listOf((Object[]) new c[]{a0.getOrCreateKotlinClass(WidgetTabsHost.class), a0.getOrCreateKotlinClass(WidgetIncomingShare.class)});
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetCaptchaBottomSheet$binding$2.INSTANCE, null, 2, null); private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetCaptchaBottomSheet$binding$2.INSTANCE, null, 2, null);
@ -83,16 +82,16 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
companion.show(fragmentManager, str, captchaErrorBody, function0); companion.show(fragmentManager, str, captchaErrorBody, function0);
} }
public final void enqueue(String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2, Function0<Unit> function0, CaptchaErrorBody captchaErrorBody) { public final void enqueue(String str, Function2<? super AppFragment, ? super String, Unit> function2, Function0<Unit> function0, CaptchaErrorBody captchaErrorBody) {
m.checkNotNullParameter(str, "requestKey"); m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived"); m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(WidgetCaptchaBottomSheet.NOTICE_NAME, null, 0, 0, false, WidgetCaptchaBottomSheet.access$getResolvableFragments$cp(), 0, false, 0, new WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1(str, captchaErrorBody, function0, function2), FontUtils.MAX_FONT_SCALING, null)); StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(WidgetCaptchaBottomSheet.NOTICE_NAME, null, 0, 0, false, WidgetCaptchaBottomSheet.access$getResolvableFragments$cp(), 0, false, 0, new WidgetCaptchaBottomSheet$Companion$enqueue$captchaNotice$1(str, captchaErrorBody, function0, function2), FontUtils.MAX_FONT_SCALING, null));
} }
public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2) { public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super String, Unit> function2) {
m.checkNotNullParameter(appFragment, "fragment"); m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(str, "requestKey"); m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived"); m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
FragmentKt.setFragmentResultListener(appFragment, str, new WidgetCaptchaBottomSheet$Companion$registerForResult$1(str, function2, appFragment)); FragmentKt.setFragmentResultListener(appFragment, str, new WidgetCaptchaBottomSheet$Companion$registerForResult$1(str, function2, appFragment));
} }
@ -162,13 +161,10 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE; CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
String captchaToken = captchaHelper.getCaptchaToken(); String captchaToken = captchaHelper.getCaptchaToken();
if (captchaToken != null) { if (captchaToken != null) {
String captchaRqtoken = captchaHelper.getCaptchaRqtoken();
captchaHelper.setCaptchaToken(null); captchaHelper.setCaptchaToken(null);
captchaHelper.setCaptchaRqtoken(null);
String requestCode = getRequestCode(); String requestCode = getRequestCode();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(RESULT_EXTRA_CAPTCHA_TOKEN, captchaToken); bundle.putString(RESULT_EXTRA_CAPTCHA_TOKEN, captchaToken);
bundle.putString(RESULT_EXTRA_CAPTCHA_RQTOKEN, captchaRqtoken);
FragmentKt.setFragmentResult(this, requestCode, bundle); FragmentKt.setFragmentResult(this, requestCode, bundle);
dismiss(); dismiss();
} }
@ -190,10 +186,6 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper.CaptchaRequest captchaRequest; CaptchaHelper.CaptchaRequest captchaRequest;
String captchaSitekey = getCaptchaErrorBody().getCaptchaSitekey(); String captchaSitekey = getCaptchaErrorBody().getCaptchaSitekey();
CaptchaService captchaService = getCaptchaErrorBody().getCaptchaService(); CaptchaService captchaService = getCaptchaErrorBody().getCaptchaService();
String captchaRqdata = getCaptchaErrorBody().getCaptchaRqdata();
String captchaRqtoken = getCaptchaErrorBody().getCaptchaRqtoken();
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
captchaHelper.setCaptchaRqtoken(captchaRqtoken);
if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) { if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) {
FragmentActivity requireActivity = requireActivity(); FragmentActivity requireActivity = requireActivity();
m.checkNotNullExpressionValue(requireActivity, "requireActivity()"); m.checkNotNullExpressionValue(requireActivity, "requireActivity()");
@ -201,9 +193,9 @@ public final class WidgetCaptchaBottomSheet extends AppBottomSheet {
} else { } else {
FragmentActivity requireActivity2 = requireActivity(); FragmentActivity requireActivity2 = requireActivity();
m.checkNotNullExpressionValue(requireActivity2, "requireActivity()"); m.checkNotNullExpressionValue(requireActivity2, "requireActivity()");
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2, captchaRqdata); captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2);
} }
ObservableExtensionsKt.appSubscribe$default(captchaHelper.tryShowCaptcha(captchaRequest), WidgetCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(CaptchaHelper.INSTANCE.tryShowCaptcha(captchaRequest), WidgetCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null);
} }
@Override // com.discord.app.AppBottomSheet @Override // com.discord.app.AppBottomSheet

View File

@ -30,10 +30,10 @@ public final class WidgetChatListAdapterItemSystemMessage$onConfigure$1 implemen
if (type != null && type.intValue() == 7) { if (type != null && type.intValue() == 7) {
WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getEventHandler().onMessageAuthorNameClicked(this.$message, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId()); WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getEventHandler().onMessageAuthorNameClicked(this.$message, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId());
} else if ((type != null && type.intValue() == 8) || ((type != null && type.intValue() == 9) || ((type != null && type.intValue() == 10) || (type != null && type.intValue() == 11)))) { } else if ((type != null && type.intValue() == 8) || ((type != null && type.intValue() == 9) || ((type != null && type.intValue() == 10) || (type != null && type.intValue() == 11)))) {
boolean z2 = false; boolean z2 = true;
Experiment guildExperiment = this.$storeExperiments.getGuildExperiment("2022-01_boost_announcement_upsell", WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), false); Experiment guildExperiment = this.$storeExperiments.getGuildExperiment("2022-01_boost_announcement_upsell", WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), true);
if (guildExperiment != null && guildExperiment.getBucket() == 1) { if (guildExperiment == null || guildExperiment.getBucket() != 1) {
z2 = true; z2 = false;
} }
if (z2) { if (z2) {
AnalyticsTracker.guildBoostPromotionOpened$default(AnalyticsTracker.INSTANCE, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), new Traits.Location(null, Traits.Location.Section.CHANNEL_TEXT_AREA, Traits.Location.Obj.BOOST_GEM_ICON, null, null, 25, null), null, 4, null); AnalyticsTracker.guildBoostPromotionOpened$default(AnalyticsTracker.INSTANCE, WidgetChatListAdapterItemSystemMessage.access$getAdapter$p(this.this$0).getData().getGuildId(), new Traits.Location(null, Traits.Location.Section.CHANNEL_TEXT_AREA, Traits.Location.Obj.BOOST_GEM_ICON, null, null, 25, null), null, 4, null);

View File

@ -1,12 +1,11 @@
package com.discord.widgets.contact_sync; package com.discord.widgets.contact_sync;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetContactSync.kt */ /* compiled from: WidgetContactSync.kt */
public final class WidgetContactSync$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> { public final class WidgetContactSync$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final /* synthetic */ WidgetContactSync this$0; public final /* synthetic */ WidgetContactSync this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,13 +17,13 @@ public final class WidgetContactSync$captchaLauncher$1 extends o implements Func
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(captchaPayload); invoke(str);
return Unit.a; return Unit.a;
} }
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(String str) {
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "token");
WidgetContactSync.access$submitPhoneNumber(this.this$0, captchaPayload); WidgetContactSync.access$submitPhoneNumber(this.this$0, str);
} }
} }

View File

@ -24,7 +24,6 @@ import com.discord.app.LoggingConfig;
import com.discord.databinding.WidgetContactSyncBinding; import com.discord.databinding.WidgetContactSyncBinding;
import com.discord.utilities.accessibility.AccessibilityUtils; import com.discord.utilities.accessibility.AccessibilityUtils;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.contacts.ContactsProviderUtils; import com.discord.utilities.contacts.ContactsProviderUtils;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.mg_recycler.MGRecyclerAdapter; import com.discord.utilities.mg_recycler.MGRecyclerAdapter;
@ -161,8 +160,8 @@ public final class WidgetContactSync extends AppFragment {
widgetContactSync.displayedChildIndex = i; widgetContactSync.displayedChildIndex = i;
} }
public static final /* synthetic */ void access$submitPhoneNumber(WidgetContactSync widgetContactSync, CaptchaHelper.CaptchaPayload captchaPayload) { public static final /* synthetic */ void access$submitPhoneNumber(WidgetContactSync widgetContactSync, String str) {
widgetContactSync.submitPhoneNumber(captchaPayload); widgetContactSync.submitPhoneNumber(str);
} }
private final void configureToolbar(WidgetContactSyncViewModel.ToolbarConfig toolbarConfig) { private final void configureToolbar(WidgetContactSyncViewModel.ToolbarConfig toolbarConfig) {
@ -358,15 +357,15 @@ public final class WidgetContactSync extends AppFragment {
requestContacts(new WidgetContactSync$requestContactsPermissions$1(this), new WidgetContactSync$requestContactsPermissions$2(this)); requestContacts(new WidgetContactSync$requestContactsPermissions$1(this), new WidgetContactSync$requestContactsPermissions$2(this));
} }
private final void submitPhoneNumber(CaptchaHelper.CaptchaPayload captchaPayload) { private final void submitPhoneNumber(String str) {
getViewModel().onPhoneNumberSubmitted(getBinding().f2338b.f120b.getTextOrEmpty(), captchaPayload); getViewModel().onPhoneNumberSubmitted(getBinding().f2338b.f120b.getTextOrEmpty(), str);
} }
public static /* synthetic */ void submitPhoneNumber$default(WidgetContactSync widgetContactSync, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ void submitPhoneNumber$default(WidgetContactSync widgetContactSync, String str, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
captchaPayload = null; str = null;
} }
widgetContactSync.submitPhoneNumber(captchaPayload); widgetContactSync.submitPhoneNumber(str);
} }
@Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a @Override // com.discord.app.AppFragment, com.discord.app.AppLogger.a

View File

@ -21,7 +21,6 @@ import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider; import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.stores.utilities.RestCallStateKt; import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.mg_recycler.MGRecyclerAdapterSimple; import com.discord.utilities.mg_recycler.MGRecyclerAdapterSimple;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload; import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
@ -1316,9 +1315,9 @@ public final class WidgetContactSyncViewModel extends AppViewModel<ViewState> {
} }
@MainThread @MainThread
public final void onPhoneNumberSubmitted(String str, CaptchaHelper.CaptchaPayload captchaPayload) { public final void onPhoneNumberSubmitted(String str, String str2) {
m.checkNotNullParameter(str, "phoneNumber"); m.checkNotNullParameter(str, "phoneNumber");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.userAddPhone(new RestAPIParams.Phone(str, WidgetUserPhoneManage.Companion.Source.CONTACT_SYNC.getSource(), captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null)), false, 1, null), this, null, 2, null), WidgetContactSyncViewModel.class, (Context) null, (Function1) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$2(this), (Function0) null, (Function0) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.userAddPhone(new RestAPIParams.Phone(str, WidgetUserPhoneManage.Companion.Source.CONTACT_SYNC.getSource(), str2)), false, 1, null), this, null, 2, null), WidgetContactSyncViewModel.class, (Context) null, (Function1) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$2(this), (Function0) null, (Function0) null, new WidgetContactSyncViewModel$onPhoneNumberSubmitted$1(this), 54, (Object) null);
} }
@MainThread @MainThread

View File

@ -22,7 +22,6 @@ import com.discord.stores.StoreUserPresence;
import com.discord.stores.StoreUserRelationships; import com.discord.stores.StoreUserRelationships;
import com.discord.stores.updates.ObservationDeck; import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider; import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload; import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
@ -1509,11 +1508,11 @@ public final class FriendsListViewModel extends AppViewModel<ViewState> {
this((i & 1) != 0 ? Companion.observeStores() : observable, (i & 2) != 0 ? StoreStream.Companion.getChannels() : storeChannels, (i & 4) != 0 ? RestAPI.Companion.getApi() : restAPI); this((i & 1) != 0 ? Companion.observeStores() : observable, (i & 2) != 0 ? StoreStream.Companion.getChannels() : storeChannels, (i & 4) != 0 ? RestAPI.Companion.getApi() : restAPI);
} }
public static /* synthetic */ void acceptFriendSuggestion$default(FriendsListViewModel friendsListViewModel, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) { public static /* synthetic */ void acceptFriendSuggestion$default(FriendsListViewModel friendsListViewModel, String str, int i, String str2, int i2, Object obj) {
if ((i2 & 4) != 0) { if ((i2 & 4) != 0) {
captchaPayload = null; str2 = null;
} }
friendsListViewModel.acceptFriendSuggestion(str, i, captchaPayload); friendsListViewModel.acceptFriendSuggestion(str, i, str2);
} }
public static final /* synthetic */ void access$emitCaptchaErrorEvent(FriendsListViewModel friendsListViewModel, Error error, String str, int i) { public static final /* synthetic */ void access$emitCaptchaErrorEvent(FriendsListViewModel friendsListViewModel, Error error, String str, int i) {
@ -1719,9 +1718,9 @@ public final class FriendsListViewModel extends AppViewModel<ViewState> {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.addRelationship$default(this.restAPI, LOCATION, j, null, null, null, 28, null), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendRequest$2(this, str), (Function0) null, (Function0) null, new FriendsListViewModel$acceptFriendRequest$1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.addRelationship$default(this.restAPI, LOCATION, j, null, null, null, 28, null), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendRequest$2(this, str), (Function0) null, (Function0) null, new FriendsListViewModel$acceptFriendRequest$1(this), 54, (Object) null);
} }
public final void acceptFriendSuggestion(String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) { public final void acceptFriendSuggestion(String str, int i, String str2) {
m.checkNotNullParameter(str, "username"); m.checkNotNullParameter(str, "username");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().sendRelationshipRequest("Friends List - Friend Suggestion", str, i, captchaPayload), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendSuggestion$2(this, str, i), (Function0) null, (Function0) null, FriendsListViewModel$acceptFriendSuggestion$1.INSTANCE, 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().sendRelationshipRequest("Friends List - Friend Suggestion", str, i, str2), false, 1, null), this, null, 2, null), FriendsListViewModel.class, (Context) null, (Function1) null, new FriendsListViewModel$acceptFriendSuggestion$2(this, str, i), (Function0) null, (Function0) null, FriendsListViewModel$acceptFriendSuggestion$1.INSTANCE, 54, (Object) null);
} }
@MainThread @MainThread

View File

@ -1,12 +1,11 @@
package com.discord.widgets.friends; package com.discord.widgets.friends;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetFriendsAddById.kt */ /* compiled from: WidgetFriendsAddById.kt */
public final class WidgetFriendsAddById$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> { public final class WidgetFriendsAddById$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final /* synthetic */ WidgetFriendsAddById this$0; public final /* synthetic */ WidgetFriendsAddById this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,13 +17,13 @@ public final class WidgetFriendsAddById$captchaLauncher$1 extends o implements F
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(captchaPayload); invoke(str);
return Unit.a; return Unit.a;
} }
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(String str) {
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "token");
WidgetFriendsAddById.access$extractTargetAndSendFriendRequest(this.this$0, captchaPayload); WidgetFriendsAddById.access$extractTargetAndSendFriendRequest(this.this$0, str);
} }
} }

View File

@ -21,7 +21,6 @@ import com.discord.models.user.User;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaErrorBody; import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.color.ColorCompat; import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
@ -145,8 +144,8 @@ public final class WidgetFriendsAddById extends AppFragment {
super(R.layout.widget_friends_add_by_id); super(R.layout.widget_friends_add_by_id);
} }
public static final /* synthetic */ void access$extractTargetAndSendFriendRequest(WidgetFriendsAddById widgetFriendsAddById, CaptchaHelper.CaptchaPayload captchaPayload) { public static final /* synthetic */ void access$extractTargetAndSendFriendRequest(WidgetFriendsAddById widgetFriendsAddById, String str) {
widgetFriendsAddById.extractTargetAndSendFriendRequest(captchaPayload); widgetFriendsAddById.extractTargetAndSendFriendRequest(str);
} }
public static final /* synthetic */ WidgetFriendsAddByIdBinding access$getBinding$p(WidgetFriendsAddById widgetFriendsAddById) { public static final /* synthetic */ WidgetFriendsAddByIdBinding access$getBinding$p(WidgetFriendsAddById widgetFriendsAddById) {
@ -165,13 +164,13 @@ public final class WidgetFriendsAddById extends AppFragment {
widgetFriendsAddById.setInputEditError(charSequence); widgetFriendsAddById.setInputEditError(charSequence);
} }
private final void extractTargetAndSendFriendRequest(CaptchaHelper.CaptchaPayload captchaPayload) { private final void extractTargetAndSendFriendRequest(String str) {
TextInputLayout textInputLayout = getBinding().e; TextInputLayout textInputLayout = getBinding().e;
m.checkNotNullExpressionValue(textInputLayout, "binding.friendsAddTextEditWrap"); m.checkNotNullExpressionValue(textInputLayout, "binding.friendsAddTextEditWrap");
String textOrEmpty = ViewExtensions.getTextOrEmpty(textInputLayout); String textOrEmpty = ViewExtensions.getTextOrEmpty(textInputLayout);
Companion.UserNameDiscriminator access$extractUsernameAndDiscriminator = Companion.access$extractUsernameAndDiscriminator(Companion, textOrEmpty); Companion.UserNameDiscriminator access$extractUsernameAndDiscriminator = Companion.access$extractUsernameAndDiscriminator(Companion, textOrEmpty);
if (access$extractUsernameAndDiscriminator.getDiscriminator() != null) { if (access$extractUsernameAndDiscriminator.getDiscriminator() != null) {
sendFriendRequest(access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator().intValue(), captchaPayload); sendFriendRequest(access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator().intValue(), str);
return; return;
} }
Context context = getContext(); Context context = getContext();
@ -183,11 +182,11 @@ public final class WidgetFriendsAddById extends AppFragment {
AnalyticsTracker.INSTANCE.friendRequestFailed(textOrEmpty, access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator(), "Invalid Username"); AnalyticsTracker.INSTANCE.friendRequestFailed(textOrEmpty, access$extractUsernameAndDiscriminator.getUsername(), access$extractUsernameAndDiscriminator.getDiscriminator(), "Invalid Username");
} }
public static /* synthetic */ void extractTargetAndSendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ void extractTargetAndSendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, String str, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
captchaPayload = null; str = null;
} }
widgetFriendsAddById.extractTargetAndSendFriendRequest(captchaPayload); widgetFriendsAddById.extractTargetAndSendFriendRequest(str);
} }
private final WidgetFriendsAddByIdBinding getBinding() { private final WidgetFriendsAddByIdBinding getBinding() {
@ -209,15 +208,15 @@ public final class WidgetFriendsAddById extends AppFragment {
WidgetCaptcha.Companion.launch(requireContext(), this.captchaLauncher, CaptchaErrorBody.Companion.createFromError(error)); WidgetCaptcha.Companion.launch(requireContext(), this.captchaLauncher, CaptchaErrorBody.Companion.createFromError(error));
} }
private final void sendFriendRequest(String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) { private final void sendFriendRequest(String str, int i, String str2) {
ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Search - Add Friend Search", str, i, captchaPayload), this, null, 2, null).k(o.h(new WidgetFriendsAddById$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsAddById$sendFriendRequest$2(this, str, i))); ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Search - Add Friend Search", str, i, str2), this, null, 2, null).k(o.h(new WidgetFriendsAddById$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsAddById$sendFriendRequest$2(this, str, i)));
} }
public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) { public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsAddById widgetFriendsAddById, String str, int i, String str2, int i2, Object obj) {
if ((i2 & 4) != 0) { if ((i2 & 4) != 0) {
captchaPayload = null; str2 = null;
} }
widgetFriendsAddById.sendFriendRequest(str, i, captchaPayload); widgetFriendsAddById.sendFriendRequest(str, i, str2);
} }
private final void setInputEditError(CharSequence charSequence) { private final void setInputEditError(CharSequence charSequence) {

View File

@ -1,12 +1,11 @@
package com.discord.widgets.friends; package com.discord.widgets.friends;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetFriendsFindNearby.kt */ /* compiled from: WidgetFriendsFindNearby.kt */
public final class WidgetFriendsFindNearby$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> { public final class WidgetFriendsFindNearby$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final /* synthetic */ WidgetFriendsFindNearby this$0; public final /* synthetic */ WidgetFriendsFindNearby this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,17 +17,17 @@ public final class WidgetFriendsFindNearby$captchaLauncher$1 extends o implement
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(captchaPayload); invoke(str);
return Unit.a; return Unit.a;
} }
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(String str) {
Integer discriminator; Integer discriminator;
m.checkNotNullParameter(captchaPayload, "token"); m.checkNotNullParameter(str, "token");
String username = WidgetFriendsFindNearby.access$getViewModel$p(this.this$0).getUsername(); String username = WidgetFriendsFindNearby.access$getViewModel$p(this.this$0).getUsername();
if (username != null && (discriminator = WidgetFriendsFindNearby.access$getViewModel$p(this.this$0).getDiscriminator()) != null) { if (username != null && (discriminator = WidgetFriendsFindNearby.access$getViewModel$p(this.this$0).getDiscriminator()) != null) {
WidgetFriendsFindNearby.access$sendFriendRequest(this.this$0, username, discriminator.intValue(), captchaPayload); WidgetFriendsFindNearby.access$sendFriendRequest(this.this$0, username, discriminator.intValue(), str);
} }
} }
} }

View File

@ -22,7 +22,6 @@ import com.discord.stores.StoreStream;
import com.discord.utilities.accessibility.AccessibilityUtils; import com.discord.utilities.accessibility.AccessibilityUtils;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaErrorBody; import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.color.ColorCompat; import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.dimen.DimenUtils; import com.discord.utilities.dimen.DimenUtils;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
@ -258,8 +257,8 @@ public final class WidgetFriendsFindNearby extends AppFragment {
widgetFriendsFindNearby.launchCaptchaFlow(error); widgetFriendsFindNearby.launchCaptchaFlow(error);
} }
public static final /* synthetic */ void access$sendFriendRequest(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) { public static final /* synthetic */ void access$sendFriendRequest(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, String str2) {
widgetFriendsFindNearby.sendFriendRequest(str, i, captchaPayload); widgetFriendsFindNearby.sendFriendRequest(str, i, str2);
} }
public static final /* synthetic */ void access$setResultsAdapter$p(WidgetFriendsFindNearby widgetFriendsFindNearby, WidgetFriendsAddUserAdapter widgetFriendsAddUserAdapter) { public static final /* synthetic */ void access$setResultsAdapter$p(WidgetFriendsFindNearby widgetFriendsFindNearby, WidgetFriendsAddUserAdapter widgetFriendsAddUserAdapter) {
@ -412,17 +411,17 @@ public final class WidgetFriendsFindNearby extends AppFragment {
WidgetCaptcha.Companion.launch(requireContext(), this.captchaLauncher, CaptchaErrorBody.Companion.createFromError(error)); WidgetCaptcha.Companion.launch(requireContext(), this.captchaLauncher, CaptchaErrorBody.Companion.createFromError(error));
} }
private final void sendFriendRequest(String str, int i, CaptchaHelper.CaptchaPayload captchaPayload) { private final void sendFriendRequest(String str, int i, String str2) {
getViewModel().setUsername(str); getViewModel().setUsername(str);
getViewModel().setDiscriminator(Integer.valueOf(i)); getViewModel().setDiscriminator(Integer.valueOf(i));
ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Nearby - Add Friend Suggestion", str, i, captchaPayload), this, null, 2, null).k(o.h(new WidgetFriendsFindNearby$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsFindNearby$sendFriendRequest$2(this, str, i))); ObservableExtensionsKt.ui$default(RestAPI.Companion.getApi().sendRelationshipRequest("Nearby - Add Friend Suggestion", str, i, str2), this, null, 2, null).k(o.h(new WidgetFriendsFindNearby$sendFriendRequest$1(this, str), getAppActivity(), new WidgetFriendsFindNearby$sendFriendRequest$2(this, str, i)));
} }
public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) { public static /* synthetic */ void sendFriendRequest$default(WidgetFriendsFindNearby widgetFriendsFindNearby, String str, int i, String str2, int i2, Object obj) {
if ((i2 & 4) != 0) { if ((i2 & 4) != 0) {
captchaPayload = null; str2 = null;
} }
widgetFriendsFindNearby.sendFriendRequest(str, i, captchaPayload); widgetFriendsFindNearby.sendFriendRequest(str, i, str2);
} }
private final void updateMeUserIdAndInitNearbyManager() { private final void updateMeUserIdAndInitNearbyManager() {

View File

@ -1,14 +1,13 @@
package com.discord.widgets.friends; package com.discord.widgets.friends;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.widgets.friends.FriendsListViewModel; import com.discord.widgets.friends.FriendsListViewModel;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function2;
/* compiled from: WidgetFriendsList.kt */ /* compiled from: WidgetFriendsList.kt */
public final class WidgetFriendsList$handleCaptchaError$1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public final class WidgetFriendsList$handleCaptchaError$1 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ FriendsListViewModel.Event.CaptchaError $event; public final /* synthetic */ FriendsListViewModel.Event.CaptchaError $event;
public final /* synthetic */ WidgetFriendsList this$0; public final /* synthetic */ WidgetFriendsList this$0;
@ -22,14 +21,14 @@ public final class WidgetFriendsList$handleCaptchaError$1 extends o implements F
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>"); m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "captchaToken");
WidgetFriendsList.access$getViewModel$p(this.this$0).acceptFriendSuggestion(this.$event.getUsername(), this.$event.getDiscriminator(), captchaPayload); WidgetFriendsList.access$getViewModel$p(this.this$0).acceptFriendSuggestion(this.$event.getUsername(), this.$event.getDiscriminator(), str);
} }
} }

View File

@ -15,7 +15,6 @@ import com.discord.app.AppFragment;
import com.discord.models.domain.ModelInvite; import com.discord.models.domain.ModelInvite;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.channel.ChannelSelector; import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.coroutines.RxCoroutineExtensionsKt; import com.discord.utilities.coroutines.RxCoroutineExtensionsKt;
import com.discord.utilities.error.AppCancellationException; import com.discord.utilities.error.AppCancellationException;
@ -45,9 +44,9 @@ import kotlin.jvm.internal.Ref$ObjectRef;
import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.CoroutineScope;
import retrofit2.HttpException; import retrofit2.HttpException;
/* compiled from: InviteJoinHelper.kt */ /* compiled from: InviteJoinHelper.kt */
@e(c = "com.discord.widgets.guilds.invite.InviteJoinHelper$joinViaInvite$4", f = "InviteJoinHelper.kt", l = {79, 104, 117, 118, 132, 171, 200}, m = "invokeSuspend") @e(c = "com.discord.widgets.guilds.invite.InviteJoinHelper$joinViaInvite$4", f = "InviteJoinHelper.kt", l = {78, 103, 112, 113, 127, 166, 195}, m = "invokeSuspend")
public final class InviteJoinHelper$joinViaInvite$4 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> { public final class InviteJoinHelper$joinViaInvite$4 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public final /* synthetic */ CaptchaHelper.CaptchaPayload $captchaPayload; public final /* synthetic */ String $captchaKey;
public final /* synthetic */ AppFragment $fragment; public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ ModelInvite $invite; public final /* synthetic */ ModelInvite $invite;
public final /* synthetic */ Class $javaClass; public final /* synthetic */ Class $javaClass;
@ -62,13 +61,13 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
public int label; public int label;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public InviteJoinHelper$joinViaInvite$4(AppFragment appFragment, ModelInvite modelInvite, String str, Function2 function2, CaptchaHelper.CaptchaPayload captchaPayload, Class cls, Function2 function22, Function2 function23, Continuation continuation) { public InviteJoinHelper$joinViaInvite$4(AppFragment appFragment, ModelInvite modelInvite, String str, Function2 function2, String str2, Class cls, Function2 function22, Function2 function23, Continuation continuation) {
super(2, continuation); super(2, continuation);
this.$fragment = appFragment; this.$fragment = appFragment;
this.$invite = modelInvite; this.$invite = modelInvite;
this.$location = str; this.$location = str;
this.$onInvitePostSuccess = function2; this.$onInvitePostSuccess = function2;
this.$captchaPayload = captchaPayload; this.$captchaKey = str2;
this.$javaClass = cls; this.$javaClass = cls;
this.$onInvitePostError = function22; this.$onInvitePostError = function22;
this.$onInviteFlowFinished = function23; this.$onInviteFlowFinished = function23;
@ -77,7 +76,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
@Override // d0.w.i.a.a @Override // d0.w.i.a.a
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) { public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
m.checkNotNullParameter(continuation, "completion"); m.checkNotNullParameter(continuation, "completion");
return new InviteJoinHelper$joinViaInvite$4(this.$fragment, this.$invite, this.$location, this.$onInvitePostSuccess, this.$captchaPayload, this.$javaClass, this.$onInvitePostError, this.$onInviteFlowFinished, continuation); return new InviteJoinHelper$joinViaInvite$4(this.$fragment, this.$invite, this.$location, this.$onInvitePostSuccess, this.$captchaKey, this.$javaClass, this.$onInvitePostError, this.$onInviteFlowFinished, continuation);
} }
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@ -86,21 +85,21 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
return ((InviteJoinHelper$joinViaInvite$4) create(coroutineScope, continuation)).invokeSuspend(Unit.a); return ((InviteJoinHelper$joinViaInvite$4) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
} }
/* JADX WARNING: Removed duplicated region for block: B:102:0x024d A[RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:104:0x0273 */
/* JADX WARNING: Removed duplicated region for block: B:103:0x024e */ /* JADX WARNING: Removed duplicated region for block: B:117:0x02be */
/* JADX WARNING: Removed duplicated region for block: B:112:0x0285 */ /* JADX WARNING: Removed duplicated region for block: B:121:0x02cd */
/* JADX WARNING: Removed duplicated region for block: B:125:0x02d0 */ /* JADX WARNING: Removed duplicated region for block: B:151:0x035e */
/* JADX WARNING: Removed duplicated region for block: B:129:0x02df */ /* JADX WARNING: Removed duplicated region for block: B:152:0x036c */
/* JADX WARNING: Removed duplicated region for block: B:159:0x0370 */ /* JADX WARNING: Removed duplicated region for block: B:164:0x03c0 */
/* JADX WARNING: Removed duplicated region for block: B:160:0x037e */ /* JADX WARNING: Removed duplicated region for block: B:167:0x03d3 A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:172:0x03d2 */
/* JADX WARNING: Removed duplicated region for block: B:175:0x03e5 A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:69:0x01a1 */ /* JADX WARNING: Removed duplicated region for block: B:69:0x01a1 */
/* JADX WARNING: Removed duplicated region for block: B:74:0x01ac */ /* JADX WARNING: Removed duplicated region for block: B:74:0x01ac */
/* JADX WARNING: Removed duplicated region for block: B:79:0x01d2 */ /* JADX WARNING: Removed duplicated region for block: B:79:0x01d2 */
/* JADX WARNING: Removed duplicated region for block: B:80:0x01d4 */ /* JADX WARNING: Removed duplicated region for block: B:80:0x01d4 */
/* JADX WARNING: Removed duplicated region for block: B:82:0x01d7 */ /* JADX WARNING: Removed duplicated region for block: B:82:0x01d7 */
/* JADX WARNING: Removed duplicated region for block: B:87:0x01f2 */ /* JADX WARNING: Removed duplicated region for block: B:87:0x01f2 */
/* JADX WARNING: Removed duplicated region for block: B:94:0x023b A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:95:0x023c */
/* JADX WARNING: Unknown variable types count: 2 */ /* JADX WARNING: Unknown variable types count: 2 */
@Override // d0.w.i.a.a @Override // d0.w.i.a.a
public final Object invokeSuspend(Object obj) { public final Object invokeSuspend(Object obj) {
@ -333,20 +332,13 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
} }
return Unit.a; return Unit.a;
} }
RestAPI api = RestAPI.Companion.getApi();
ModelInvite modelInvite6 = this.$invite;
String str2 = this.$location;
CaptchaHelper.CaptchaPayload captchaPayload = this.$captchaPayload;
String captchaKey = captchaPayload != null ? captchaPayload.getCaptchaKey() : null;
CaptchaHelper.CaptchaPayload captchaPayload2 = this.$captchaPayload;
String captchaRqtoken = captchaPayload2 != null ? captchaPayload2.getCaptchaRqtoken() : null;
Boolean boxBoolean3 = b.boxBoolean(true); Boolean boxBoolean3 = b.boxBoolean(true);
this.L$0 = ref$ObjectRef2; this.L$0 = ref$ObjectRef2;
this.L$1 = modelInvite4; this.L$1 = modelInvite4;
this.L$2 = null; this.L$2 = null;
this.L$3 = null; this.L$3 = null;
this.label = 3; this.label = 3;
obj3 = RxCoroutineExtensionsKt.appAwaitSingle(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(api.postInviteCode(modelInvite6, str2, new RestAPIParams.InviteCode(captchaKey, captchaRqtoken)), false, 1, null)), ref$ObjectRef2.element, boxBoolean3, this); obj3 = RxCoroutineExtensionsKt.appAwaitSingle(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().postInviteCode(this.$invite, this.$location, new RestAPIParams.InviteCode(this.$captchaKey)), false, 1, null)), ref$ObjectRef2.element, boxBoolean3, this);
if (obj3 == coroutine_suspended) { if (obj3 == coroutine_suspended) {
return coroutine_suspended; return coroutine_suspended;
} }
@ -487,7 +479,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
} }
return Unit.a; return Unit.a;
case 3: case 3:
ModelInvite modelInvite7 = (ModelInvite) this.L$1; ModelInvite modelInvite6 = (ModelInvite) this.L$1;
ref$ObjectRef2 = (Ref$ObjectRef) this.L$0; ref$ObjectRef2 = (Ref$ObjectRef) this.L$0;
l.throwOnFailure(obj); l.throwOnFailure(obj);
obj3 = obj; obj3 = obj;

View File

@ -13,7 +13,6 @@ import com.discord.app.AppFragment;
import com.discord.models.domain.ModelAuditLogEntry; import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.models.domain.ModelInvite; import com.discord.models.domain.ModelInvite;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.channel.ChannelSelector; import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.coroutines.AppCoroutineScopeKt; import com.discord.utilities.coroutines.AppCoroutineScopeKt;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
@ -44,8 +43,8 @@ public final class InviteJoinHelper {
inviteJoinHelper.navigateToGuild(modelInvite); inviteJoinHelper.navigateToGuild(modelInvite);
} }
public static /* synthetic */ Job joinViaInvite$default(InviteJoinHelper inviteJoinHelper, ModelInvite modelInvite, Class cls, AppFragment appFragment, String str, Function2 function2, Function2 function22, Function2 function23, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ Job joinViaInvite$default(InviteJoinHelper inviteJoinHelper, ModelInvite modelInvite, Class cls, AppFragment appFragment, String str, Function2 function2, Function2 function22, Function2 function23, String str2, int i, Object obj) {
return inviteJoinHelper.joinViaInvite(modelInvite, cls, appFragment, str, (i & 16) != 0 ? new InviteJoinHelper$joinViaInvite$1(null) : function2, (i & 32) != 0 ? new InviteJoinHelper$joinViaInvite$2(null) : function22, (i & 64) != 0 ? new InviteJoinHelper$joinViaInvite$3(null) : function23, (i & 128) != 0 ? null : captchaPayload); return inviteJoinHelper.joinViaInvite(modelInvite, cls, appFragment, str, (i & 16) != 0 ? new InviteJoinHelper$joinViaInvite$1(null) : function2, (i & 32) != 0 ? new InviteJoinHelper$joinViaInvite$2(null) : function22, (i & 64) != 0 ? new InviteJoinHelper$joinViaInvite$3(null) : function23, (i & 128) != 0 ? null : str2);
} }
private final void navigateToChannel(Context context, AppFragment appFragment, ModelInvite modelInvite) { private final void navigateToChannel(Context context, AppFragment appFragment, ModelInvite modelInvite) {
@ -83,7 +82,7 @@ public final class InviteJoinHelper {
} }
} }
public final Job joinViaInvite(ModelInvite modelInvite, Class<?> cls, AppFragment appFragment, String str, Function2<? super Error, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function22, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function23, CaptchaHelper.CaptchaPayload captchaPayload) { public final Job joinViaInvite(ModelInvite modelInvite, Class<?> cls, AppFragment appFragment, String str, Function2<? super Error, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function22, Function2<? super ModelInvite, ? super Continuation<? super Unit>, ? extends Object> function23, String str2) {
m.checkNotNullParameter(modelInvite, "invite"); m.checkNotNullParameter(modelInvite, "invite");
m.checkNotNullParameter(cls, "javaClass"); m.checkNotNullParameter(cls, "javaClass");
m.checkNotNullParameter(appFragment, "fragment"); m.checkNotNullParameter(appFragment, "fragment");
@ -93,6 +92,6 @@ public final class InviteJoinHelper {
m.checkNotNullParameter(function23, "onInviteFlowFinished"); m.checkNotNullParameter(function23, "onInviteFlowFinished");
LifecycleOwner viewLifecycleOwner = appFragment.getViewLifecycleOwner(); LifecycleOwner viewLifecycleOwner = appFragment.getViewLifecycleOwner();
m.checkNotNullExpressionValue(viewLifecycleOwner, "fragment.viewLifecycleOwner"); m.checkNotNullExpressionValue(viewLifecycleOwner, "fragment.viewLifecycleOwner");
return AppCoroutineScopeKt.appLaunch$default(LifecycleOwnerKt.getLifecycleScope(viewLifecycleOwner), cls, (CoroutineContext) null, (CoroutineStart) null, new InviteJoinHelper$joinViaInvite$4(appFragment, modelInvite, str, function22, captchaPayload, cls, function2, function23, null), 6, (Object) null); return AppCoroutineScopeKt.appLaunch$default(LifecycleOwnerKt.getLifecycleScope(viewLifecycleOwner), cls, (CoroutineContext) null, (CoroutineStart) null, new InviteJoinHelper$joinViaInvite$4(appFragment, modelInvite, str, function22, str2, cls, function2, function23, null), 6, (Object) null);
} }
} }

View File

@ -3,7 +3,6 @@ package com.discord.widgets.guilds.join;
import android.content.Context; import android.content.Context;
import com.discord.api.guild.Guild; import com.discord.api.guild.Guild;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
@ -14,14 +13,14 @@ import kotlin.jvm.functions.Function1;
import rx.Subscription; import rx.Subscription;
/* compiled from: GuildJoinHelper.kt */ /* compiled from: GuildJoinHelper.kt */
public final class GuildJoinHelperKt { public final class GuildJoinHelperKt {
public static final void joinGuild(Context context, long j, boolean z2, String str, Long l, String str2, Class<?> cls, Function1<? super Subscription, Unit> function1, Function1<? super Error, Unit> function12, CaptchaHelper.CaptchaPayload captchaPayload, Function1<? super Guild, Unit> function13) { public static final void joinGuild(Context context, long j, boolean z2, String str, Long l, String str2, Class<?> cls, Function1<? super Subscription, Unit> function1, Function1<? super Error, Unit> function12, String str3, Function1<? super Guild, Unit> function13) {
m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(cls, "errorClass"); m.checkNotNullParameter(cls, "errorClass");
m.checkNotNullParameter(function13, "onNext"); m.checkNotNullParameter(function13, "onNext");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().joinGuild(j, z2, str, l, new RestAPIParams.InviteCode(captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null), str2), false, 1, null)), cls, (Context) null, function1, new GuildJoinHelperKt$joinGuild$1(context, j, z2, str, l, cls, function1, function12, function13), (Function0) null, (Function0) null, function13, 50, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().joinGuild(j, z2, str, l, new RestAPIParams.InviteCode(str3), str2), false, 1, null)), cls, (Context) null, function1, new GuildJoinHelperKt$joinGuild$1(context, j, z2, str, l, cls, function1, function12, function13), (Function0) null, (Function0) null, function13, 50, (Object) null);
} }
public static /* synthetic */ void joinGuild$default(Context context, long j, boolean z2, String str, Long l, String str2, Class cls, Function1 function1, Function1 function12, CaptchaHelper.CaptchaPayload captchaPayload, Function1 function13, int i, Object obj) { public static /* synthetic */ void joinGuild$default(Context context, long j, boolean z2, String str, Long l, String str2, Class cls, Function1 function1, Function1 function12, String str3, Function1 function13, int i, Object obj) {
joinGuild(context, j, z2, (i & 8) != 0 ? null : str, (i & 16) != 0 ? null : l, (i & 32) != 0 ? null : str2, cls, (i & 128) != 0 ? null : function1, (i & 256) != 0 ? null : function12, (i & 512) != 0 ? null : captchaPayload, function13); joinGuild(context, j, z2, (i & 8) != 0 ? null : str, (i & 16) != 0 ? null : l, (i & 32) != 0 ? null : str2, cls, (i & 128) != 0 ? null : function1, (i & 256) != 0 ? null : function12, (i & 512) != 0 ? null : str3, function13);
} }
} }

View File

@ -19,7 +19,7 @@ import kotlin.jvm.functions.Function2;
/* compiled from: WidgetGuildJoinCaptchaBottomSheet.kt */ /* compiled from: WidgetGuildJoinCaptchaBottomSheet.kt */
public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCaptchaNotice$1 extends o implements Function1<FragmentActivity, Boolean> { public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCaptchaNotice$1 extends o implements Function1<FragmentActivity, Boolean> {
public final /* synthetic */ CaptchaErrorBody $error; public final /* synthetic */ CaptchaErrorBody $error;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived; public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ String $requestKey; public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -27,7 +27,7 @@ public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCapt
super(1); super(1);
this.$requestKey = str; this.$requestKey = str;
this.$error = captchaErrorBody; this.$error = captchaErrorBody;
this.$onCaptchaPayloadReceived = function2; this.$onCaptchaTokenReceived = function2;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -64,7 +64,7 @@ public final class WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCapt
if (fragment == null) { if (fragment == null) {
return true; return true;
} }
WidgetGuildJoinCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaPayloadReceived); WidgetGuildJoinCaptchaBottomSheet.Companion.registerForResult((AppFragment) fragment, this.$requestKey, this.$onCaptchaTokenReceived);
return true; return true;
} }
} }

View File

@ -2,7 +2,6 @@ package com.discord.widgets.guilds.join;
import android.os.Bundle; import android.os.Bundle;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
@ -10,14 +9,14 @@ import kotlin.jvm.functions.Function2;
/* compiled from: WidgetGuildJoinCaptchaBottomSheet.kt */ /* compiled from: WidgetGuildJoinCaptchaBottomSheet.kt */
public final class WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> { public final class WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> {
public final /* synthetic */ AppFragment $fragment; public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ Function2 $onCaptchaPayloadReceived; public final /* synthetic */ Function2 $onCaptchaTokenReceived;
public final /* synthetic */ String $requestKey; public final /* synthetic */ String $requestKey;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1(String str, Function2 function2, AppFragment appFragment) { public WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1(String str, Function2 function2, AppFragment appFragment) {
super(2); super(2);
this.$requestKey = str; this.$requestKey = str;
this.$onCaptchaPayloadReceived = function2; this.$onCaptchaTokenReceived = function2;
this.$fragment = appFragment; this.$fragment = appFragment;
} }
@ -30,14 +29,11 @@ public final class WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult
} }
public final void invoke(String str, Bundle bundle) { public final void invoke(String str, Bundle bundle) {
String string;
m.checkNotNullParameter(str, "resultRequestKey"); m.checkNotNullParameter(str, "resultRequestKey");
m.checkNotNullParameter(bundle, "bundle"); m.checkNotNullParameter(bundle, "bundle");
if (m.areEqual(this.$requestKey, str)) { if (m.areEqual(this.$requestKey, str) && (string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", "")) != null && (!m.areEqual(string, ""))) {
String string = bundle.getString("INTENT_EXTRA_CAPTCHA_TOKEN", ""); this.$onCaptchaTokenReceived.invoke(this.$fragment, string);
String string2 = bundle.getString("INTENT_EXTRA_CAPTCHA_RQTOKEN", "");
if (string != null && (!m.areEqual(string, ""))) {
this.$onCaptchaPayloadReceived.invoke(this.$fragment, new CaptchaHelper.CaptchaPayload(string, string2));
}
} }
} }
} }

View File

@ -42,7 +42,6 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
private static final String ARG_REQUEST_KEY = "INTENT_EXTRA_REQUEST_CODE"; private static final String ARG_REQUEST_KEY = "INTENT_EXTRA_REQUEST_CODE";
public static final Companion Companion = new Companion(null); public static final Companion Companion = new Companion(null);
private static final String NOTICE_NAME = "guild captcha notice"; private static final String NOTICE_NAME = "guild captcha notice";
private static final String RESULT_EXTRA_CAPTCHA_RQTOKEN = "INTENT_EXTRA_CAPTCHA_RQTOKEN";
private static final String RESULT_EXTRA_CAPTCHA_TOKEN = "INTENT_EXTRA_CAPTCHA_TOKEN"; private static final String RESULT_EXTRA_CAPTCHA_TOKEN = "INTENT_EXTRA_CAPTCHA_TOKEN";
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildJoinCaptchaBottomSheet$binding$2.INSTANCE, null, 2, null); private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildJoinCaptchaBottomSheet$binding$2.INSTANCE, null, 2, null);
private final Lazy captchaErrorBody$delegate = g.lazy(new WidgetGuildJoinCaptchaBottomSheet$captchaErrorBody$2(this)); private final Lazy captchaErrorBody$delegate = g.lazy(new WidgetGuildJoinCaptchaBottomSheet$captchaErrorBody$2(this));
@ -57,16 +56,16 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
this(); this();
} }
public final void enqueue(String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2, CaptchaErrorBody captchaErrorBody) { public final void enqueue(String str, Function2<? super AppFragment, ? super String, Unit> function2, CaptchaErrorBody captchaErrorBody) {
m.checkNotNullParameter(str, "requestKey"); m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived"); m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(WidgetGuildJoinCaptchaBottomSheet.NOTICE_NAME, null, 0, 0, false, d0.t.m.listOf(a0.getOrCreateKotlinClass(WidgetTabsHost.class)), 0, false, 0, new WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCaptchaNotice$1(str, captchaErrorBody, function2), FontUtils.MAX_FONT_SCALING, null)); StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(WidgetGuildJoinCaptchaBottomSheet.NOTICE_NAME, null, 0, 0, false, d0.t.m.listOf(a0.getOrCreateKotlinClass(WidgetTabsHost.class)), 0, false, 0, new WidgetGuildJoinCaptchaBottomSheet$Companion$enqueue$guildCaptchaNotice$1(str, captchaErrorBody, function2), FontUtils.MAX_FONT_SCALING, null));
} }
public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super CaptchaHelper.CaptchaPayload, Unit> function2) { public final void registerForResult(AppFragment appFragment, String str, Function2<? super AppFragment, ? super String, Unit> function2) {
m.checkNotNullParameter(appFragment, "fragment"); m.checkNotNullParameter(appFragment, "fragment");
m.checkNotNullParameter(str, "requestKey"); m.checkNotNullParameter(str, "requestKey");
m.checkNotNullParameter(function2, "onCaptchaPayloadReceived"); m.checkNotNullParameter(function2, "onCaptchaTokenReceived");
FragmentKt.setFragmentResultListener(appFragment, str, new WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1(str, function2, appFragment)); FragmentKt.setFragmentResultListener(appFragment, str, new WidgetGuildJoinCaptchaBottomSheet$Companion$registerForResult$1(str, function2, appFragment));
} }
@ -115,13 +114,10 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE; CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
String captchaToken = captchaHelper.getCaptchaToken(); String captchaToken = captchaHelper.getCaptchaToken();
if (captchaToken != null) { if (captchaToken != null) {
String captchaRqtoken = captchaHelper.getCaptchaRqtoken();
captchaHelper.setCaptchaToken(null); captchaHelper.setCaptchaToken(null);
captchaHelper.setCaptchaRqtoken(null);
String requestCode = getRequestCode(); String requestCode = getRequestCode();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(RESULT_EXTRA_CAPTCHA_TOKEN, captchaToken); bundle.putString(RESULT_EXTRA_CAPTCHA_TOKEN, captchaToken);
bundle.putString(RESULT_EXTRA_CAPTCHA_RQTOKEN, captchaRqtoken);
FragmentKt.setFragmentResult(this, requestCode, bundle); FragmentKt.setFragmentResult(this, requestCode, bundle);
dismiss(); dismiss();
} }
@ -143,10 +139,6 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
CaptchaHelper.CaptchaRequest captchaRequest; CaptchaHelper.CaptchaRequest captchaRequest;
String captchaSitekey = getCaptchaErrorBody().getCaptchaSitekey(); String captchaSitekey = getCaptchaErrorBody().getCaptchaSitekey();
CaptchaService captchaService = getCaptchaErrorBody().getCaptchaService(); CaptchaService captchaService = getCaptchaErrorBody().getCaptchaService();
String captchaRqdata = getCaptchaErrorBody().getCaptchaRqdata();
String captchaRqtoken = getCaptchaErrorBody().getCaptchaRqtoken();
CaptchaHelper captchaHelper = CaptchaHelper.INSTANCE;
captchaHelper.setCaptchaRqtoken(captchaRqtoken);
if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) { if (captchaSitekey == null || captchaService != CaptchaService.HCAPTCHA) {
FragmentActivity requireActivity = requireActivity(); FragmentActivity requireActivity = requireActivity();
m.checkNotNullExpressionValue(requireActivity, "requireActivity()"); m.checkNotNullExpressionValue(requireActivity, "requireActivity()");
@ -154,9 +146,9 @@ public final class WidgetGuildJoinCaptchaBottomSheet extends AppBottomSheet {
} else { } else {
FragmentActivity requireActivity2 = requireActivity(); FragmentActivity requireActivity2 = requireActivity();
m.checkNotNullExpressionValue(requireActivity2, "requireActivity()"); m.checkNotNullExpressionValue(requireActivity2, "requireActivity()");
captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2, captchaRqdata); captchaRequest = new CaptchaHelper.CaptchaRequest.HCaptcha(captchaSitekey, requireActivity2);
} }
ObservableExtensionsKt.appSubscribe$default(captchaHelper.tryShowCaptcha(captchaRequest), WidgetGuildJoinCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(CaptchaHelper.INSTANCE.tryShowCaptcha(captchaRequest), WidgetGuildJoinCaptchaBottomSheet.class, (Context) null, (Function1) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$2(this), (Function0) null, (Function0) null, new WidgetGuildJoinCaptchaBottomSheet$openCaptcha$1(this), 54, (Object) null);
} }
public static final void show(FragmentManager fragmentManager, String str, CaptchaErrorBody captchaErrorBody) { public static final void show(FragmentManager fragmentManager, String str, CaptchaErrorBody captchaErrorBody) {

View File

@ -346,7 +346,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f; TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader"); m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(R.string.app_information); String string = getString(R.string.app_information);
textView.setText(string + " - 114.6 - Beta (114106)"); textView.setText(string + " - 114.7 - Beta (114107)");
binding.B.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this)); binding.B.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE); binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE); binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE);

View File

@ -6,7 +6,6 @@ import com.discord.api.channel.Channel;
import com.discord.models.user.MeUser; import com.discord.models.user.MeUser;
import com.discord.stores.StoreMessages; import com.discord.stores.StoreMessages;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.messagesend.MessageResult; import com.discord.utilities.messagesend.MessageResult;
import com.discord.utilities.view.extensions.ViewExtensions; import com.discord.utilities.view.extensions.ViewExtensions;
import com.discord.widgets.chat.list.ViewEmbedGameInvite; import com.discord.widgets.chat.list.ViewEmbedGameInvite;
@ -19,16 +18,16 @@ import kotlin.Pair;
import rx.Observable; import rx.Observable;
/* compiled from: WidgetIncomingShare.kt */ /* compiled from: WidgetIncomingShare.kt */
public final class WidgetIncomingShare$onSendClicked$2<T, R> implements b<Pair<? extends MeUser, ? extends Channel>, Observable<? extends Pair<? extends MeUser, ? extends MessageResult>>> { public final class WidgetIncomingShare$onSendClicked$2<T, R> implements b<Pair<? extends MeUser, ? extends Channel>, Observable<? extends Pair<? extends MeUser, ? extends MessageResult>>> {
public final /* synthetic */ CaptchaHelper.CaptchaPayload $captchaPayload; public final /* synthetic */ String $captchaKey;
public final /* synthetic */ List $data; public final /* synthetic */ List $data;
public final /* synthetic */ ViewEmbedGameInvite.Model $gameInviteModel; public final /* synthetic */ ViewEmbedGameInvite.Model $gameInviteModel;
public final /* synthetic */ WidgetIncomingShare this$0; public final /* synthetic */ WidgetIncomingShare this$0;
public WidgetIncomingShare$onSendClicked$2(WidgetIncomingShare widgetIncomingShare, List list, ViewEmbedGameInvite.Model model, CaptchaHelper.CaptchaPayload captchaPayload) { public WidgetIncomingShare$onSendClicked$2(WidgetIncomingShare widgetIncomingShare, List list, ViewEmbedGameInvite.Model model, String str) {
this.this$0 = widgetIncomingShare; this.this$0 = widgetIncomingShare;
this.$data = list; this.$data = list;
this.$gameInviteModel = model; this.$gameInviteModel = model;
this.$captchaPayload = captchaPayload; this.$captchaKey = str;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -56,6 +55,6 @@ public final class WidgetIncomingShare$onSendClicked$2<T, R> implements b<Pair<?
ViewEmbedGameInvite.Model model2 = this.$gameInviteModel; ViewEmbedGameInvite.Model model2 = this.$gameInviteModel;
Activity activity = model2 != null ? model2.getActivity() : null; Activity activity = model2 != null ? model2.getActivity() : null;
ViewEmbedGameInvite.Model model3 = this.$gameInviteModel; ViewEmbedGameInvite.Model model3 = this.$gameInviteModel;
return StoreMessages.sendMessage$default(messages, h, component1, textOrEmpty, null, list, null, null, null, application, activity, model3 != null ? model3.getMessageActivity() : null, null, null, null, this.$captchaPayload, 14464, null).F(new WidgetIncomingShare$onSendClicked$2$$special$$inlined$let$lambda$1(this, component1)); return StoreMessages.sendMessage$default(messages, h, component1, textOrEmpty, null, list, null, null, null, application, activity, model3 != null ? model3.getMessageActivity() : null, null, null, null, this.$captchaKey, 14464, null).F(new WidgetIncomingShare$onSendClicked$2$$special$$inlined$let$lambda$1(this, component1));
} }
} }

View File

@ -12,7 +12,6 @@ import com.discord.models.user.MeUser;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.captcha.CaptchaErrorBody; import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.guilds.GuildUtilsKt; import com.discord.utilities.guilds.GuildUtilsKt;
import com.discord.utilities.messagesend.MessageResult; import com.discord.utilities.messagesend.MessageResult;
@ -52,7 +51,7 @@ public final class WidgetIncomingShare$onSendClicked$3 extends o implements Func
/* compiled from: WidgetIncomingShare.kt */ /* compiled from: WidgetIncomingShare.kt */
/* renamed from: com.discord.widgets.share.WidgetIncomingShare$onSendClicked$3$2 reason: invalid class name */ /* renamed from: com.discord.widgets.share.WidgetIncomingShare$onSendClicked$3$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public static final class AnonymousClass2 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ WidgetIncomingShare$onSendClicked$3 this$0; public final /* synthetic */ WidgetIncomingShare$onSendClicked$3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -64,16 +63,16 @@ public final class WidgetIncomingShare$onSendClicked$3 extends o implements Func
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>"); m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "captchaToken");
WidgetIncomingShare$onSendClicked$3 widgetIncomingShare$onSendClicked$3 = this.this$0; WidgetIncomingShare$onSendClicked$3 widgetIncomingShare$onSendClicked$3 = this.this$0;
WidgetIncomingShare.access$onSendClicked(widgetIncomingShare$onSendClicked$3.this$0, widgetIncomingShare$onSendClicked$3.$context, widgetIncomingShare$onSendClicked$3.$receiver, widgetIncomingShare$onSendClicked$3.$gameInviteModel, widgetIncomingShare$onSendClicked$3.$contentModel, widgetIncomingShare$onSendClicked$3.$isOnCooldown, widgetIncomingShare$onSendClicked$3.$maxFileSizeMB, widgetIncomingShare$onSendClicked$3.$isUserPremium, captchaPayload); WidgetIncomingShare.access$onSendClicked(widgetIncomingShare$onSendClicked$3.this$0, widgetIncomingShare$onSendClicked$3.$context, widgetIncomingShare$onSendClicked$3.$receiver, widgetIncomingShare$onSendClicked$3.$gameInviteModel, widgetIncomingShare$onSendClicked$3.$contentModel, widgetIncomingShare$onSendClicked$3.$isOnCooldown, widgetIncomingShare$onSendClicked$3.$maxFileSizeMB, widgetIncomingShare$onSendClicked$3.$isUserPremium, str);
} }
} }

View File

@ -18,7 +18,7 @@ public final class WidgetIncomingShare$onViewBound$4 implements View.OnClickList
public final /* synthetic */ WidgetIncomingShare this$0; public final /* synthetic */ WidgetIncomingShare this$0;
/* compiled from: WidgetIncomingShare.kt */ /* compiled from: WidgetIncomingShare.kt */
@e(c = "com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1", f = "WidgetIncomingShare.kt", l = {138}, m = "invokeSuspend") @e(c = "com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1", f = "WidgetIncomingShare.kt", l = {137}, m = "invokeSuspend")
/* renamed from: com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1 reason: invalid class name */ /* renamed from: com.discord.widgets.share.WidgetIncomingShare$onViewBound$4$1 reason: invalid class name */
public static final class AnonymousClass1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> { public static final class AnonymousClass1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public int label; public int label;

View File

@ -33,7 +33,6 @@ import com.discord.stores.StoreUser;
import com.discord.utilities.ShareUtils; import com.discord.utilities.ShareUtils;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.attachments.AttachmentUtilsKt; import com.discord.utilities.attachments.AttachmentUtilsKt;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.channel.ChannelSelector; import com.discord.utilities.channel.ChannelSelector;
import com.discord.utilities.dimen.DimenUtils; import com.discord.utilities.dimen.DimenUtils;
import com.discord.utilities.intent.IntentUtils; import com.discord.utilities.intent.IntentUtils;
@ -483,8 +482,8 @@ public final class WidgetIncomingShare extends AppFragment {
widgetIncomingShare.initialize(contentModel); widgetIncomingShare.initialize(contentModel);
} }
public static final /* synthetic */ void access$onSendClicked(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, CaptchaHelper.CaptchaPayload captchaPayload) { public static final /* synthetic */ void access$onSendClicked(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, String str) {
widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, captchaPayload); widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, str);
} }
public static final /* synthetic */ void access$onSendCompleted(WidgetIncomingShare widgetIncomingShare) { public static final /* synthetic */ void access$onSendCompleted(WidgetIncomingShare widgetIncomingShare) {
@ -657,7 +656,7 @@ public final class WidgetIncomingShare extends AppFragment {
} }
} }
private final void onSendClicked(Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, CaptchaHelper.CaptchaPayload captchaPayload) { private final void onSendClicked(Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, String str) {
Observable.c cVar; Observable.c cVar;
List<Attachment> list; List<Attachment> list;
boolean z4; boolean z4;
@ -759,7 +758,7 @@ public final class WidgetIncomingShare extends AppFragment {
Observable observeMe$default = StoreUser.observeMe$default(companion2.getUsers(), false, 1, null); Observable observeMe$default = StoreUser.observeMe$default(companion2.getUsers(), false, 1, null);
Observable<R> k = companion2.getChannelsSelected().observeSelectedChannel().k(cVar); Observable<R> k = companion2.getChannelsSelected().observeSelectedChannel().k(cVar);
m.checkNotNullExpressionValue(k, "StoreStream\n … .compose(filter)"); m.checkNotNullExpressionValue(k, "StoreStream\n … .compose(filter)");
Observable z8 = Observable.j(observeMe$default, ObservableExtensionsKt.takeSingleUntilTimeout$default(k, 1000, false, 2, null), WidgetIncomingShare$onSendClicked$1.INSTANCE).Z(1).z(new WidgetIncomingShare$onSendClicked$2(this, list, model, captchaPayload)); Observable z8 = Observable.j(observeMe$default, ObservableExtensionsKt.takeSingleUntilTimeout$default(k, 1000, false, 2, null), WidgetIncomingShare$onSendClicked$1.INSTANCE).Z(1).z(new WidgetIncomingShare$onSendClicked$2(this, list, model, str));
m.checkNotNullExpressionValue(z8, "Observable\n .comb…ervable.empty()\n }"); m.checkNotNullExpressionValue(z8, "Observable\n .comb…ervable.empty()\n }");
WidgetGlobalSearchAdapter widgetGlobalSearchAdapter = this.resultsAdapter; WidgetGlobalSearchAdapter widgetGlobalSearchAdapter = this.resultsAdapter;
if (widgetGlobalSearchAdapter == null) { if (widgetGlobalSearchAdapter == null) {
@ -768,8 +767,8 @@ public final class WidgetIncomingShare extends AppFragment {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer(ObservableExtensionsKt.ui(z8, this, widgetGlobalSearchAdapter), getBinding().f2458b, 0), WidgetIncomingShare.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetIncomingShare$onSendClicked$3(this, list, context, itemDataPayload, model, contentModel, z2, i, z3, z4, z5, z6), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer(ObservableExtensionsKt.ui(z8, this, widgetGlobalSearchAdapter), getBinding().f2458b, 0), WidgetIncomingShare.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetIncomingShare$onSendClicked$3(this, list, context, itemDataPayload, model, contentModel, z2, i, z3, z4, z5, z6), 62, (Object) null);
} }
public static /* synthetic */ void onSendClicked$default(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) { public static /* synthetic */ void onSendClicked$default(WidgetIncomingShare widgetIncomingShare, Context context, WidgetGlobalSearchModel.ItemDataPayload itemDataPayload, ViewEmbedGameInvite.Model model, ContentModel contentModel, boolean z2, int i, boolean z3, String str, int i2, Object obj) {
widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, (i2 & 128) != 0 ? null : captchaPayload); widgetIncomingShare.onSendClicked(context, itemDataPayload, model, contentModel, z2, i, z3, (i2 & 128) != 0 ? null : str);
} }
private final void onSendCompleted() { private final void onSendCompleted() {

View File

@ -1,12 +1,11 @@
package com.discord.widgets.user.phone; package com.discord.widgets.user.phone;
import com.discord.utilities.captcha.CaptchaHelper;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetUserPhoneManage.kt */ /* compiled from: WidgetUserPhoneManage.kt */
public final class WidgetUserPhoneManage$captchaLauncher$1 extends o implements Function1<CaptchaHelper.CaptchaPayload, Unit> { public final class WidgetUserPhoneManage$captchaLauncher$1 extends o implements Function1<String, Unit> {
public final /* synthetic */ WidgetUserPhoneManage this$0; public final /* synthetic */ WidgetUserPhoneManage this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,13 +17,13 @@ public final class WidgetUserPhoneManage$captchaLauncher$1 extends o implements
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(captchaPayload); invoke(str);
return Unit.a; return Unit.a;
} }
public final void invoke(CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(String str) {
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "token");
WidgetUserPhoneManage.access$updatePhoneNumber(this.this$0, captchaPayload); WidgetUserPhoneManage.access$updatePhoneNumber(this.this$0, str);
} }
} }

View File

@ -21,7 +21,6 @@ import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser; import com.discord.stores.StoreUser;
import com.discord.stores.updates.ObservationDeck; import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider; import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.drawable.DrawableCompat; import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.intent.IntentUtilsKt; import com.discord.utilities.intent.IntentUtilsKt;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
@ -148,8 +147,8 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase {
widgetUserPhoneManage.source = str; widgetUserPhoneManage.source = str;
} }
public static final /* synthetic */ void access$updatePhoneNumber(WidgetUserPhoneManage widgetUserPhoneManage, CaptchaHelper.CaptchaPayload captchaPayload) { public static final /* synthetic */ void access$updatePhoneNumber(WidgetUserPhoneManage widgetUserPhoneManage, String str) {
widgetUserPhoneManage.updatePhoneNumber(captchaPayload); widgetUserPhoneManage.updatePhoneNumber(str);
} }
private final void configureUI(MeUser meUser) { private final void configureUI(MeUser meUser) {
@ -212,21 +211,21 @@ public final class WidgetUserPhoneManage extends WidgetUserAccountVerifyBase {
WidgetNoticeDialog.Companion.show$default(companion, parentFragmentManager, i, i2, i3, b.i(resources4, R.string.cancel, new Object[0], null, 4), g0.mapOf(o.to(Integer.valueOf((int) R.id.notice_ok), new WidgetUserPhoneManage$removePhoneNumber$1(this))), null, null, null, Integer.valueOf((int) R.attr.notice_theme_positive_red), null, null, 0, null, 15808, null); WidgetNoticeDialog.Companion.show$default(companion, parentFragmentManager, i, i2, i3, b.i(resources4, R.string.cancel, new Object[0], null, 4), g0.mapOf(o.to(Integer.valueOf((int) R.id.notice_ok), new WidgetUserPhoneManage$removePhoneNumber$1(this))), null, null, null, Integer.valueOf((int) R.attr.notice_theme_positive_red), null, null, 0, null, 15808, null);
} }
private final void updatePhoneNumber(CaptchaHelper.CaptchaPayload captchaPayload) { private final void updatePhoneNumber(String str) {
String textOrEmpty = getBinding().f.getTextOrEmpty(); String textOrEmpty = getBinding().f.getTextOrEmpty();
RestAPI api = RestAPI.Companion.getApi(); RestAPI api = RestAPI.Companion.getApi();
String str = this.source; String str2 = this.source;
if (str == null) { if (str2 == null) {
m.throwUninitializedPropertyAccessException("source"); m.throwUninitializedPropertyAccessException("source");
} }
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.restSubscribeOn$default(api.userAddPhone(new RestAPIParams.Phone(textOrEmpty, str, captchaPayload != null ? captchaPayload.getCaptchaKey() : null, captchaPayload != null ? captchaPayload.getCaptchaRqtoken() : null)), false, 1, null), getBinding().f2661b, 0, 2, null), this, null, 2, null), WidgetUserPhoneManage.class, (Context) null, (Function1) null, new WidgetUserPhoneManage$updatePhoneNumber$1(this), (Function0) null, (Function0) null, new WidgetUserPhoneManage$updatePhoneNumber$2(this, textOrEmpty), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.restSubscribeOn$default(api.userAddPhone(new RestAPIParams.Phone(textOrEmpty, str2, str)), false, 1, null), getBinding().f2661b, 0, 2, null), this, null, 2, null), WidgetUserPhoneManage.class, (Context) null, (Function1) null, new WidgetUserPhoneManage$updatePhoneNumber$1(this), (Function0) null, (Function0) null, new WidgetUserPhoneManage$updatePhoneNumber$2(this, textOrEmpty), 54, (Object) null);
} }
public static /* synthetic */ void updatePhoneNumber$default(WidgetUserPhoneManage widgetUserPhoneManage, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ void updatePhoneNumber$default(WidgetUserPhoneManage widgetUserPhoneManage, String str, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
captchaPayload = null; str = null;
} }
widgetUserPhoneManage.updatePhoneNumber(captchaPayload); widgetUserPhoneManage.updatePhoneNumber(str);
} }
@Override // com.discord.widgets.user.account.WidgetUserAccountVerifyBase, com.discord.app.AppFragment @Override // com.discord.widgets.user.account.WidgetUserAccountVerifyBase, com.discord.app.AppFragment

View File

@ -3,7 +3,6 @@ package com.discord.widgets.user.usersheet;
import com.discord.R; import com.discord.R;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaErrorBody; import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPIAbortMessages; import com.discord.utilities.rest.RestAPIAbortMessages;
import com.discord.widgets.captcha.WidgetCaptchaBottomSheet; import com.discord.widgets.captcha.WidgetCaptchaBottomSheet;
@ -29,7 +28,7 @@ public final class WidgetUserSheetViewModel$addRelationship$2 extends o implemen
/* compiled from: WidgetUserSheetViewModel.kt */ /* compiled from: WidgetUserSheetViewModel.kt */
/* renamed from: com.discord.widgets.user.usersheet.WidgetUserSheetViewModel$addRelationship$2$1$1 reason: invalid class name */ /* renamed from: com.discord.widgets.user.usersheet.WidgetUserSheetViewModel$addRelationship$2$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public static final class AnonymousClass1 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ AnonymousClass1 this$0; public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -41,16 +40,16 @@ public final class WidgetUserSheetViewModel$addRelationship$2 extends o implemen
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>"); m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "captchaToken");
WidgetUserSheetViewModel$addRelationship$2 widgetUserSheetViewModel$addRelationship$2 = this.this$0.this$0; WidgetUserSheetViewModel$addRelationship$2 widgetUserSheetViewModel$addRelationship$2 = this.this$0.this$0;
widgetUserSheetViewModel$addRelationship$2.this$0.addRelationship(widgetUserSheetViewModel$addRelationship$2.$type, widgetUserSheetViewModel$addRelationship$2.$username, widgetUserSheetViewModel$addRelationship$2.$successMessageStringRes, captchaPayload); widgetUserSheetViewModel$addRelationship$2.this$0.addRelationship(widgetUserSheetViewModel$addRelationship$2.$type, widgetUserSheetViewModel$addRelationship$2.$username, widgetUserSheetViewModel$addRelationship$2.$successMessageStringRes, str);
} }
} }

View File

@ -34,7 +34,6 @@ import com.discord.stores.StoreMediaSettings;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.stores.StoreUserNotes; import com.discord.stores.StoreUserNotes;
import com.discord.stores.StoreUserProfile; import com.discord.stores.StoreUserProfile;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.dimen.DimenUtils; import com.discord.utilities.dimen.DimenUtils;
import com.discord.utilities.guilds.RoleUtils; import com.discord.utilities.guilds.RoleUtils;
import com.discord.utilities.icon.IconUtils; import com.discord.utilities.icon.IconUtils;
@ -1830,11 +1829,11 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
widgetUserSheetViewModel.updateViewState(viewState); widgetUserSheetViewModel.updateViewState(viewState);
} }
public static /* synthetic */ void addRelationship$default(WidgetUserSheetViewModel widgetUserSheetViewModel, Integer num, String str, int i, CaptchaHelper.CaptchaPayload captchaPayload, int i2, Object obj) { public static /* synthetic */ void addRelationship$default(WidgetUserSheetViewModel widgetUserSheetViewModel, Integer num, String str, int i, String str2, int i2, Object obj) {
if ((i2 & 8) != 0) { if ((i2 & 8) != 0) {
captchaPayload = null; str2 = null;
} }
widgetUserSheetViewModel.addRelationship(num, str, i, captchaPayload); widgetUserSheetViewModel.addRelationship(num, str, i, str2);
} }
private final UserProfileAdminView.ViewState createAdminViewState(Channel channel, boolean z2, boolean z3, ManageUserContext manageUserContext, VoiceState voiceState, boolean z4, boolean z5) { private final UserProfileAdminView.ViewState createAdminViewState(Channel channel, boolean z2, boolean z3, ManageUserContext manageUserContext, VoiceState voiceState, boolean z4, boolean z5) {
@ -2160,9 +2159,9 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
return m.areEqual(a, l); return m.areEqual(a, l);
} }
public final void addRelationship(Integer num, String str, @StringRes int i, CaptchaHelper.CaptchaPayload captchaPayload) { public final void addRelationship(Integer num, String str, @StringRes int i, String str2) {
m.checkNotNullParameter(str, "username"); m.checkNotNullParameter(str, "username");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.addRelationship("User Profile", this.userId, num, this.friendToken, captchaPayload), false, 1, null), this, null, 2, null), WidgetUserSheetViewModel.class, (Context) null, (Function1) null, new WidgetUserSheetViewModel$addRelationship$2(this, num, str, i), (Function0) null, (Function0) null, new WidgetUserSheetViewModel$addRelationship$1(this, i), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.addRelationship("User Profile", this.userId, num, this.friendToken, str2), false, 1, null), this, null, 2, null), WidgetUserSheetViewModel.class, (Context) null, (Function1) null, new WidgetUserSheetViewModel$addRelationship$2(this, num, str, i), (Function0) null, (Function0) null, new WidgetUserSheetViewModel$addRelationship$1(this, i), 54, (Object) null);
} }
public final void banUser() { public final void banUser() {

View File

@ -3,7 +3,6 @@ package com.discord.widgets.voice.call;
import android.content.Context; import android.content.Context;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.utilities.captcha.CaptchaErrorBody; import com.discord.utilities.captcha.CaptchaErrorBody;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPIAbortMessages; import com.discord.utilities.rest.RestAPIAbortMessages;
import com.discord.widgets.captcha.WidgetCaptchaBottomSheet; import com.discord.widgets.captcha.WidgetCaptchaBottomSheet;
@ -28,7 +27,7 @@ public final class WidgetCallFailed$sendFriendRequest$2<T> implements Action1<Er
/* compiled from: WidgetCallFailed.kt */ /* compiled from: WidgetCallFailed.kt */
/* renamed from: com.discord.widgets.voice.call.WidgetCallFailed$sendFriendRequest$2$1$1 reason: invalid class name */ /* renamed from: com.discord.widgets.voice.call.WidgetCallFailed$sendFriendRequest$2$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function2<AppFragment, CaptchaHelper.CaptchaPayload, Unit> { public static final class AnonymousClass1 extends o implements Function2<AppFragment, String, Unit> {
public final /* synthetic */ AnonymousClass1 this$0; public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -40,16 +39,16 @@ public final class WidgetCallFailed$sendFriendRequest$2<T> implements Action1<Er
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2 @Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public /* bridge */ /* synthetic */ Unit invoke(AppFragment appFragment, String str) {
invoke(appFragment, captchaPayload); invoke(appFragment, str);
return Unit.a; return Unit.a;
} }
public final void invoke(AppFragment appFragment, CaptchaHelper.CaptchaPayload captchaPayload) { public final void invoke(AppFragment appFragment, String str) {
m.checkNotNullParameter(appFragment, "<anonymous parameter 0>"); m.checkNotNullParameter(appFragment, "<anonymous parameter 0>");
m.checkNotNullParameter(captchaPayload, "captchaPayload"); m.checkNotNullParameter(str, "captchaToken");
WidgetCallFailed$sendFriendRequest$2 widgetCallFailed$sendFriendRequest$2 = this.this$0.this$0; WidgetCallFailed$sendFriendRequest$2 widgetCallFailed$sendFriendRequest$2 = this.this$0.this$0;
WidgetCallFailed.access$sendFriendRequest(widgetCallFailed$sendFriendRequest$2.this$0, widgetCallFailed$sendFriendRequest$2.$userId, widgetCallFailed$sendFriendRequest$2.$username, captchaPayload); WidgetCallFailed.access$sendFriendRequest(widgetCallFailed$sendFriendRequest$2.this$0, widgetCallFailed$sendFriendRequest$2.$userId, widgetCallFailed$sendFriendRequest$2.$username, str);
} }
} }

View File

@ -14,7 +14,6 @@ import com.discord.app.AppDialog;
import com.discord.databinding.ViewDialogConfirmationBinding; import com.discord.databinding.ViewDialogConfirmationBinding;
import com.discord.models.user.User; import com.discord.models.user.User;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.captcha.CaptchaHelper;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate; import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
@ -59,8 +58,8 @@ public final class WidgetCallFailed extends AppDialog {
widgetCallFailed.configureUI(user); widgetCallFailed.configureUI(user);
} }
public static final /* synthetic */ void access$sendFriendRequest(WidgetCallFailed widgetCallFailed, long j, String str, CaptchaHelper.CaptchaPayload captchaPayload) { public static final /* synthetic */ void access$sendFriendRequest(WidgetCallFailed widgetCallFailed, long j, String str, String str2) {
widgetCallFailed.sendFriendRequest(j, str, captchaPayload); widgetCallFailed.sendFriendRequest(j, str, str2);
} }
private final void configureUI(User user) { private final void configureUI(User user) {
@ -78,15 +77,15 @@ public final class WidgetCallFailed extends AppDialog {
return (ViewDialogConfirmationBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]); return (ViewDialogConfirmationBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
} }
private final void sendFriendRequest(long j, String str, CaptchaHelper.CaptchaPayload captchaPayload) { private final void sendFriendRequest(long j, String str, String str2) {
ObservableExtensionsKt.ui$default(RestAPI.addRelationship$default(RestAPI.Companion.getApi(), "Call", j, null, null, captchaPayload, 8, null), this, null, 2, null).k(o.h(new WidgetCallFailed$sendFriendRequest$1(this), getAppActivity(), new WidgetCallFailed$sendFriendRequest$2(this, j, str))); ObservableExtensionsKt.ui$default(RestAPI.addRelationship$default(RestAPI.Companion.getApi(), "Call", j, null, null, str2, 8, null), this, null, 2, null).k(o.h(new WidgetCallFailed$sendFriendRequest$1(this), getAppActivity(), new WidgetCallFailed$sendFriendRequest$2(this, j, str)));
} }
public static /* synthetic */ void sendFriendRequest$default(WidgetCallFailed widgetCallFailed, long j, String str, CaptchaHelper.CaptchaPayload captchaPayload, int i, Object obj) { public static /* synthetic */ void sendFriendRequest$default(WidgetCallFailed widgetCallFailed, long j, String str, String str2, int i, Object obj) {
if ((i & 4) != 0) { if ((i & 4) != 0) {
captchaPayload = null; str2 = null;
} }
widgetCallFailed.sendFriendRequest(j, str, captchaPayload); widgetCallFailed.sendFriendRequest(j, str, str2);
} }
@Override // com.discord.app.AppDialog @Override // com.discord.app.AppDialog

View File

@ -107,7 +107,7 @@ public final class MessageSendWorker extends Worker {
String string3 = getInputData().getString("com.discord.intent.extra.EXTRA_MESSAGE_ID"); String string3 = getInputData().getString("com.discord.intent.extra.EXTRA_MESSAGE_ID");
long j2 = getInputData().getLong("com.discord.intent.extra.EXTRA_STICKER_ID", -1); long j2 = getInputData().getLong("com.discord.intent.extra.EXTRA_STICKER_ID", -1);
try { try {
Observable takeSingleUntilTimeout$default = ObservableExtensionsKt.takeSingleUntilTimeout$default(ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().sendMessage(j, new RestAPIParams.Message(string2, string3, null, null, j2 != -1 ? d0.t.m.listOf(Long.valueOf(j2)) : null, null, null, null, null, 492, null)), false), 0, false, 3, null); Observable takeSingleUntilTimeout$default = ObservableExtensionsKt.takeSingleUntilTimeout$default(ObservableExtensionsKt.restSubscribeOn(RestAPI.Companion.getApi().sendMessage(j, new RestAPIParams.Message(string2, string3, null, null, j2 != -1 ? d0.t.m.listOf(Long.valueOf(j2)) : null, null, null, null, 236, null)), false), 0, false, 3, null);
Objects.requireNonNull(takeSingleUntilTimeout$default); Objects.requireNonNull(takeSingleUntilTimeout$default);
Message message = (Message) new j0.m.a(takeSingleUntilTimeout$default).b(); Message message = (Message) new j0.m.a(takeSingleUntilTimeout$default).b();
NotificationData.DisplayPayload displayPayload = NotificationCache.INSTANCE.get(j); NotificationData.DisplayPayload displayPayload = NotificationCache.INSTANCE.get(j);

View File

@ -1473,7 +1473,7 @@
<string name="color_picker_custom">Custom</string> <string name="color_picker_custom">Custom</string>
<string name="color_picker_presets">Presets</string> <string name="color_picker_presets">Presets</string>
<string name="color_picker_use_default">Use Default</string> <string name="color_picker_use_default">Use Default</string>
<string name="res_2131887555_com_crashlytics_android_build_id">7d4ae7ff189b4aaca95408f33af5c4d3</string> <string name="res_2131887555_com_crashlytics_android_build_id">558831a41e70446f9e533f6bfe817c99</string>
<string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string> <string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string>
<string name="command_accessibility_desc_app_item">{applicationName} application</string> <string name="command_accessibility_desc_app_item">{applicationName} application</string>
<string name="command_accessibility_desc_app_item_selected">{applicationName} application selected</string> <string name="command_accessibility_desc_app_item_selected">{applicationName} application selected</string>