From a4f9aa0984f852b9281b197917ef67471e2cb655 Mon Sep 17 00:00:00 2001 From: Juraj Kubelka Date: Mon, 12 Mar 2018 11:24:00 -0300 Subject: [PATCH 1/4] fix #30 (sending message to private group conversation) --- .../DSDirectMessageGroupChannel.class/instance/name.st | 2 +- .../instance/nameBasedOnRecipients.st | 6 ++++++ .../DSDirectMessageGroupChannel.class/instance/position.st | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/nameBasedOnRecipients.st create mode 100644 src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/position.st diff --git a/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/name.st b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/name.st index 22077c20..acc8f127 100644 --- a/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/name.st +++ b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/name.st @@ -1,3 +1,3 @@ accessing name - ^ name \ No newline at end of file + ^ name ifNil: [ self nameBasedOnRecipients ] \ No newline at end of file diff --git a/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/nameBasedOnRecipients.st b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/nameBasedOnRecipients.st new file mode 100644 index 00000000..f358cc70 --- /dev/null +++ b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/nameBasedOnRecipients.st @@ -0,0 +1,6 @@ +accessing - computed +nameBasedOnRecipients + ^ String streamContents: [ :aStream | + self recipients + do: [ :eachRecipient | aStream << eachRecipient username ] + separatedBy: [ aStream << ', ' ] ] \ No newline at end of file diff --git a/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/position.st b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/position.st new file mode 100644 index 00000000..1c091110 --- /dev/null +++ b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/position.st @@ -0,0 +1,4 @@ +accessing +position + "Complement protocol of other channels." + ^ self lastMessageId asNumber negated \ No newline at end of file From 411cfd0fa2468782d99ee4ce3195960798ea4fc6 Mon Sep 17 00:00:00 2001 From: Juraj Kubelka Date: Mon, 12 Mar 2018 11:28:35 -0300 Subject: [PATCH 2/4] fix previous merge From 34a0c6f1668d8ddbce32ea17f3e739a747016fac Mon Sep 17 00:00:00 2001 From: Juraj Kubelka Date: Mon, 12 Mar 2018 11:37:54 -0300 Subject: [PATCH 3/4] add printOn: (issue #30) --- .../DSDirectMessageGroupChannel.class/instance/printOn..st | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/printOn..st diff --git a/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/printOn..st b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/printOn..st new file mode 100644 index 00000000..c405a3cd --- /dev/null +++ b/src/Discord-Core.package/DSDirectMessageGroupChannel.class/instance/printOn..st @@ -0,0 +1,7 @@ +printing +printOn: aStream + "Print channel name if available" + aStream << 'DM Channel: '. + self recipients + do: [ :eachRecipient | aStream << eachRecipient username ] + separatedBy: [ aStream << ', ' ] \ No newline at end of file From 784405ee346bea2afc3b4929ff09950a99245357 Mon Sep 17 00:00:00 2001 From: Juraj Kubelka Date: Mon, 12 Mar 2018 11:39:19 -0300 Subject: [PATCH 4/4] remove Commander dependency #29 --- .../BaselineOfDiscordSt.class/instance/externalProjects..st | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/BaselineOfDiscordSt.package/BaselineOfDiscordSt.class/instance/externalProjects..st b/src/BaselineOfDiscordSt.package/BaselineOfDiscordSt.class/instance/externalProjects..st index 45f56e82..39b81e4d 100644 --- a/src/BaselineOfDiscordSt.package/BaselineOfDiscordSt.class/instance/externalProjects..st +++ b/src/BaselineOfDiscordSt.package/BaselineOfDiscordSt.class/instance/externalProjects..st @@ -15,9 +15,7 @@ externalProjects: spec baseline: 'Brick' with: [ spec repository: 'github://pharo-graphics/Brick/src'; - loads: #development ]; - baseline: 'Commander' with: [ - spec repository: 'github://dionisiydk/Commander:v0.4.x' ] + loads: #development ] ]. spec for: #'pharo6.x' do: [ spec