mirror of
https://github.com/ION606/Discord-Client.git
synced 2026-05-14 21:06:55 +00:00
Fixed mesage doubling issue
This commit is contained in:
+22
-21
@@ -205,11 +205,11 @@ namespace Discord_Client_Custom.Channels
|
||||
return;
|
||||
}
|
||||
|
||||
//JsonNode[] arr = new JsonNode[1];
|
||||
//arr[0] = response;
|
||||
// JsonNode[] arr = new JsonNode[1];
|
||||
// arr[0] = response;
|
||||
|
||||
//Add the message to chat in the app
|
||||
insertMessage(dmFlowContent, uMainIcon, response);
|
||||
// Add the message to chat in the app
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user