From 98a1b7a2d8bc71bbb274b66e20f18fe6aaefc3f9 Mon Sep 17 00:00:00 2001 From: Emmanouil Kampitakis Date: Thu, 10 Dec 2020 12:19:13 +0100 Subject: [PATCH 1/4] Add the tableflip slashcommand Signed-off-by: Emmanouil Kampitakis --- src/SlashCommands.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index e2ae875ac3..8c86b8bcb6 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -166,6 +166,19 @@ export const Commands = [ }, category: CommandCategories.messages, }), + new Command({ + command: 'tableflip', + args: '', + description: _td('Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message'), + runFn: function(roomId, args) { + let message = '(╯°□°)╯︵ ┻━┻'; + if (args) { + message = message + ' ' + args; + } + return success(MatrixClientPeg.get().sendTextMessage(roomId, message)); + }, + category: CommandCategories.messages, + }), new Command({ command: 'lenny', args: '', From f4d366821404a8cd535cdf47cf6e421d9d25276e Mon Sep 17 00:00:00 2001 From: Emmanouil Kampitakis Date: Thu, 10 Dec 2020 12:19:30 +0100 Subject: [PATCH 2/4] Add the unflip slashcommand Signed-off-by: Emmanouil Kampitakis --- src/SlashCommands.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 8c86b8bcb6..79c21c4af5 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -179,6 +179,19 @@ export const Commands = [ }, category: CommandCategories.messages, }), + new Command({ + command: 'unflip', + args: '', + description: _td('Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message'), + runFn: function(roomId, args) { + let message = '┬──┬ ノ( ゜-゜ノ)'; + if (args) { + message = message + ' ' + args; + } + return success(MatrixClientPeg.get().sendTextMessage(roomId, message)); + }, + category: CommandCategories.messages, + }), new Command({ command: 'lenny', args: '', From 2488a8f1eecda73e61b2aed42fe102c10900df7c Mon Sep 17 00:00:00 2001 From: Emmanouil Kampitakis Date: Wed, 16 Dec 2020 11:48:00 +0100 Subject: [PATCH 3/4] Add string-translation for english Signed-off-by: Emmanouil Kampitakis --- src/i18n/strings/en_EN.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index eb1d0a632e..f8ef44763d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -411,6 +411,8 @@ "Command error": "Command error", "Usage": "Usage", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Prepends ¯\\_(ツ)_/¯ to a plain-text message", + "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message": "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message", + "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message": "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message", "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message", "Sends a message as plain text, without interpreting it as markdown": "Sends a message as plain text, without interpreting it as markdown", "Sends a message as html, without interpreting it as markdown": "Sends a message as html, without interpreting it as markdown", From 453575d70acc51b16cb4374b9b9e6fd93a4978af Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 18 Dec 2020 13:46:58 +0000 Subject: [PATCH 4/4] Don't play call end sound for calls that never started --- src/CallHandler.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index fac4d6fc4e..7160657c07 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -341,7 +341,8 @@ export default class CallHandler { title: _t("Answered Elsewhere"), description: _t("The call was answered on another device."), }); - } else { + } else if (oldState !== CallState.Fledgling) { + // don't play the end-call sound for calls that never got off the ground this.play(AudioID.CallEnd); } }