2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;
|
2020-07-25 00:57:58 +00:00
|
|
|
.super Lj0/n/c/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "StoreMessages.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
|
|
value = Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->invoke(Lcom/discord/utilities/messagesend/MessageResult;)V
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = null
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-07-25 00:57:58 +00:00
|
|
|
"Lj0/n/c/i;",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final synthetic $result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
|
|
|
.field public final synthetic this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;Lcom/discord/utilities/messagesend/MessageResult;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-direct {p0, p1}, Lj0/n/c/i;-><init>(I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public bridge synthetic invoke()Ljava/lang/Object;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->invoke()V
|
|
|
|
|
|
|
|
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final invoke()V
|
2020-08-10 21:02:22 +00:00
|
|
|
.locals 5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/utilities/messagesend/MessageResult$Success;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
const-string v2, "localMessage"
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreMessages;->access$getStream$p(Lcom/discord/stores/StoreMessages;)Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getSlowMode$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreSlowMode;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/utilities/messagesend/MessageResult$Success;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/messagesend/MessageResult$Success;->getMessage()Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getChannelId()J
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
move-result-wide v3
|
2020-08-01 01:14:42 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-virtual {v0, v3, v4}, Lcom/discord/stores/StoreSlowMode;->onMessageSent(J)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
invoke-static {v0, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {v1, v0}, Lcom/discord/stores/StoreMessages;->access$handleLocalMessageDelete(Lcom/discord/stores/StoreMessages;Lcom/discord/models/domain/ModelMessage;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/utilities/messagesend/MessageResult$Success;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/messagesend/MessageResult$Success;->getMessage()Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-25 02:57:47 +00:00
|
|
|
invoke-static {v1}, Lf/n/a/k/a;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreMessages;->handleMessageCreate(Ljava/util/List;)V
|
|
|
|
|
|
|
|
goto/16 :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
instance-of v1, v0, Lcom/discord/utilities/messagesend/MessageResult$Slowmode;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v3, 0x2
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
invoke-static {v1, v0, v4, v3, v4}, Lcom/discord/stores/StoreMessages;->handleSendMessageFailure$default(Lcom/discord/stores/StoreMessages;Lcom/discord/models/domain/ModelMessage;Ljava/lang/String;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreMessages;->access$getStream$p(Lcom/discord/stores/StoreMessages;)Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getSlowMode$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreSlowMode;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/utilities/messagesend/MessageResult$Slowmode;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/utilities/messagesend/MessageResult$Slowmode;->getCooldownMs()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2, v3, v4}, Lcom/discord/stores/StoreSlowMode;->onCooldown(JJ)V
|
|
|
|
|
2020-08-10 21:02:22 +00:00
|
|
|
goto :goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
instance-of v1, v0, Lcom/discord/utilities/messagesend/MessageResult$RateLimited;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
2020-08-10 21:02:22 +00:00
|
|
|
goto :goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
instance-of v1, v0, Lcom/discord/utilities/messagesend/MessageResult$UserCancelled;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-10 21:02:22 +00:00
|
|
|
invoke-static {v1, v0}, Lcom/discord/stores/StoreMessages;->access$handleLocalMessageDelete(Lcom/discord/stores/StoreMessages;Lcom/discord/models/domain/ModelMessage;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
instance-of v1, v0, Lcom/discord/utilities/messagesend/MessageResult$UnknownFailure;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/utilities/messagesend/MessageResult$UnknownFailure;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/messagesend/MessageResult$UnknownFailure;->getError()Lcom/discord/utilities/error/Error;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/error/Error;->getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "result.error.response"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/error/Error$Response;->getCode()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rest/RestAPIAbortMessages;->getAbortCodeMessageResId(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v3, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v2, v2, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v2, v2, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
invoke-static {v2}, Lcom/discord/stores/StoreMessages;->access$getContext$p(Lcom/discord/stores/StoreMessages;)Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
2020-08-10 21:02:22 +00:00
|
|
|
const v0, 0x7f120f46
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {v2, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v3, v1, v0}, Lcom/discord/stores/StoreMessages;->access$handleSendMessageFailure(Lcom/discord/stores/StoreMessages;Lcom/discord/models/domain/ModelMessage;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
instance-of v1, v0, Lcom/discord/utilities/messagesend/MessageResult$ValidationError;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1;
|
|
|
|
|
|
|
|
iget-object v2, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->this$0:Lcom/discord/stores/StoreMessages;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lcom/discord/stores/StoreMessages$sendMessage$request$1;->$localMessage:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/utilities/messagesend/MessageResult$ValidationError;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/messagesend/MessageResult$ValidationError;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v2, v1, v0}, Lcom/discord/stores/StoreMessages;->access$handleSendMessageValidationError(Lcom/discord/stores/StoreMessages;Lcom/discord/models/domain/ModelMessage;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
:goto_1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->$emitter:Lrx/Emitter;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->$result:Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-interface {v0, v1}, Lr0/g;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1$1;->this$0:Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/stores/StoreMessages$sendMessage$request$1$1;->$emitter:Lrx/Emitter;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-interface {v0}, Lr0/g;->onCompleted()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|