275 lines
7.8 KiB
Smali
275 lines
7.8 KiB
Smali
.class public final Lcom/discord/utilities/messagesend/MessageRequest$Send;
|
|
.super Lcom/discord/utilities/messagesend/MessageRequest;
|
|
.source "MessageQueue.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/utilities/messagesend/MessageRequest;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Send"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final activity:Lcom/discord/models/domain/activity/ModelActivity;
|
|
|
|
.field public final attachments:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/lytefast/flexinput/model/Attachment<",
|
|
"*>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final message:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
.field public final onPreprocessing:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/utilities/rest/SendUtils$SendPayload$Preprocessing;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final onProgress:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/rest/SendUtils$FileUpload;",
|
|
">;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/models/domain/ModelMessage;Lcom/discord/models/domain/activity/ModelActivity;Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelMessage;",
|
|
"Lcom/discord/models/domain/activity/ModelActivity;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/lytefast/flexinput/model/Attachment<",
|
|
"*>;>;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/utilities/messagesend/MessageResult;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/utilities/rest/SendUtils$SendPayload$Preprocessing;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/rest/SendUtils$FileUpload;",
|
|
">;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
if-eqz p4, :cond_3
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessage;->getNonce()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v2, "message.nonce!!"
|
|
|
|
invoke-static {v1, v2}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, v1, p4, v0}, Lcom/discord/utilities/messagesend/MessageRequest;-><init>(Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->message:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
iput-object p2, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->activity:Lcom/discord/models/domain/activity/ModelActivity;
|
|
|
|
iput-object p3, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->attachments:Ljava/util/List;
|
|
|
|
iput-object p5, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->onPreprocessing:Lkotlin/jvm/functions/Function1;
|
|
|
|
iput-object p6, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->onProgress:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-static {}, Lz/u/b/j;->throwNpe()V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "onProgress"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "onPreprocessing"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "onCompleted"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
const-string p1, "message"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getActivity()Lcom/discord/models/domain/activity/ModelActivity;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->activity:Lcom/discord/models/domain/activity/ModelActivity;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getAttachments()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/lytefast/flexinput/model/Attachment<",
|
|
"*>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->attachments:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getMessage()Lcom/discord/models/domain/ModelMessage;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->message:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getOnPreprocessing()Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/utilities/rest/SendUtils$SendPayload$Preprocessing;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->onPreprocessing:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getOnProgress()Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/rest/SendUtils$FileUpload;",
|
|
">;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->onProgress:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final validateMessage()Lcom/discord/utilities/messagesend/MessageResult$ValidationError;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->message:Lcom/discord/models/domain/ModelMessage;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelMessage;->getActivity()Lcom/discord/models/domain/ModelMessage$Activity;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageRequest$Send;->attachments:Ljava/util/List;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_1
|
|
if-nez v0, :cond_2
|
|
|
|
new-instance v0, Lcom/discord/utilities/messagesend/MessageResult$ValidationError;
|
|
|
|
const-string v1, "Cannot send attachments with activity action"
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/messagesend/MessageResult$ValidationError;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_2
|
|
return-object v0
|
|
.end method
|