aboutsummaryrefslogtreecommitdiff
path: root/telegram
diff options
context:
space:
mode:
Diffstat (limited to 'telegram')
-rw-r--r--telegram/commands.go2
-rw-r--r--telegram/utils.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/telegram/commands.go b/telegram/commands.go
index 206e049..0c83945 100644
--- a/telegram/commands.go
+++ b/telegram/commands.go
@@ -384,7 +384,7 @@ func (c *Client) ProcessTransportCommand(cmdline string, resource string) string
}
case "config":
if len(args) > 1 {
- if !gateway.MessageOutgoingPermission && args[0] == "carbons" && args[1] == "true" {
+ if gateway.MessageOutgoingPermissionVersion == 0 && args[0] == "carbons" && args[1] == "true" {
return "The server did not allow to enable carbons"
}
diff --git a/telegram/utils.go b/telegram/utils.go
index 62ce945..4caf88c 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -842,7 +842,7 @@ func (c *Client) messageToPrefix(message *client.Message, previewString string,
prefix := []string{}
// message direction
var directionChar string
- if !isPM || !gateway.MessageOutgoingPermission || !c.Session.Carbons {
+ if !isPM || gateway.MessageOutgoingPermissionVersion == 0 || !c.Session.Carbons {
if c.Session.AsciiArrows {
if message.IsOutgoing {
directionChar = "> "
@@ -914,7 +914,7 @@ func (c *Client) ensureDownloadFile(file *client.File) *client.File {
func (c *Client) ProcessIncomingMessage(chatId int64, message *client.Message) {
var isPM bool
var err error
- if gateway.MessageOutgoingPermission && c.Session.Carbons {
+ if gateway.MessageOutgoingPermissionVersion > 0 && c.Session.Carbons {
isPM, err = c.IsPM(chatId)
if err != nil {
log.Errorf("Could not determine if chat is PM: %v", err)