aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-08-03 00:08:06 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-08-03 00:08:06 +0300
commitc03ccfdfb713d4fcb089600d9fd91f03e469daca (patch)
treed759d1fe9b227f3f2887411d579c51561996c0e9 /telegram/utils.go
parent608f67551297a14e2e23603413bbce66f6ad5cd9 (diff)
Support urn:xmpp:privilege:2v1.7.4
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go4
1 files changed, 2 insertions, 2 deletions
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)