Fixed mesage doubling issue

This commit is contained in:
ION606
2023-03-12 15:40:03 -04:00
parent 032e1de330
commit 8fcd5a60fc
+19 -18
View File
@@ -209,7 +209,7 @@ namespace Discord_Client_Custom.Channels
// arr[0] = response;
// Add the message to chat in the app
insertMessage(dmFlowContent, uMainIcon, response);
// insertMessage(dmFlowContent, uMainIcon, response);
}
else
{
@@ -243,6 +243,24 @@ namespace Discord_Client_Custom.Channels
}
public string getName()
{
if (cname != null)
{
return cname;
}
return users[0].getUserName();
}
public string getId()
{
return cid;
}
public async void insertMessage(TableLayoutPanel dmFlowContent, string iconUrl, JsonNode? response)
{
Image avatar = (Image)(new Bitmap(await ChannelObj.getIconStream(iconUrl), new Size(32, 32)));
@@ -273,23 +291,6 @@ namespace Discord_Client_Custom.Channels
}
public string getName()
{
if (cname != null)
{
return cname;
}
return users[0].getUserName();
}
public string getId()
{
return cid;
}
public async Task<Image> getIcon()
{
string iconUrl;