Update trusted by root user

63 views
Skip to first unread message

HeinHtet Aung

unread,
Oct 30, 2024, 12:59:00 AMOct 30
to Tinode General
Can I update other user's  trusted with root account? now I got permission denied message
I use this "set" message to update other user's trusted 
{
  "set": {
    "id": "79031",
    "topic": "usr9TbliasFYWg",
    "desc": {
        "trusted": {
            "verified": "true",
            "staff": "true",        
            "danger": "false"  
        }
    }
  }
}

Gene

unread,
Oct 30, 2024, 2:34:51 AMOct 30
to Tinode General

Gene

unread,
Oct 30, 2024, 3:47:23 AMOct 30
to Tinode General
This is unrelated to 'permission denied', but 

        "trusted": {
            "verified": "true",
            "staff": "true",        
            "danger": "false"  
        }

is invalid. It should be

        "trusted": {
            "verified": true,
            "staff": true,        
            "danger": false  
        }

HeinHtet Aung

unread,
Oct 30, 2024, 11:38:34 AMOct 30
to Tinode General
Ok now it is work,  after I used grpc and use this paylod

{
    "set": {
        "topic": "me",
        "query": {
            "desc": {
                "public": "eyJmbiI6IkJvYiBTbWl0aCIsIm5vdGUiOiJ4byB4byB4byIsInBob3RvIjp7InJlZiI6Ii92MC9maWxlL3MvWkxjckxnNU9mNUkucG5nIiwidHlwZSI6ImpwZWcifX0=",
                "trusted": "eyJ2ZXJpZmllZCI6IHRydWUsICJzdGFmZiI6IHRydWV9"
            }
        }
    },
    "extra": {
        "auth_level": "ROOT",
        "on_behalf_of": "usr9TbliasFYWg"
    }
}

So "on_behalf_of" can use only in GRPC ? 

Gene

unread,
Oct 30, 2024, 12:04:41 PMOct 30
to Tinode General
On Wednesday, October 30, 2024 at 6:38:34 PM UTC+3 HeinHtet Aung wrote:
Ok now it is work,  after I used grpc and use this paylod

{
    "set": {
        "topic": "me",
        "query": {
            "desc": {
                "public": "eyJmbiI6IkJvYiBTbWl0aCIsIm5vdGUiOiJ4byB4byB4byIsInBob3RvIjp7InJlZiI6Ii92MC9maWxlL3MvWkxjckxnNU9mNUkucG5nIiwidHlwZSI6ImpwZWcifX0=",
                "trusted": "eyJ2ZXJpZmllZCI6IHRydWUsICJzdGFmZiI6IHRydWV9"
            }
        }
    },
    "extra": {
        "auth_level": "ROOT",
        "on_behalf_of": "usr9TbliasFYWg"
    }
}

So "on_behalf_of" can use only in GRPC ? 

Yes

HeinHtet Aung

unread,
Nov 2, 2024, 6:05:50 AMNov 2
to Tinode General
on_behalf_of  of feature can't support on "pub" ?

when I try to send out a message by using  on_behalf_of  

{
  "extra": {
    "auth_level": "ROOT",
    "on_behalf_of": "usrz1AoPrNs9F0"
  },
  "pub": {
    "id": "66681",
    "topic": "usrqTTrwSKMDiY",
    "content": "aGVsbG8gaG93IGFyZSB5b3U="
  }


It becomes invalid content in tinode web portal .

I know my usage of "on_behalf_of"    is weird,  I just want to try.


image (35).png


Gene

unread,
Nov 2, 2024, 6:10:45 AMNov 2
to Tinode General

HeinHtet Aung

unread,
Nov 2, 2024, 6:20:55 AMNov 2
to Tinode General
Thank you for your help, now it is work after I changed my content format in "put" message
Message has been deleted

HeinHtet Aung

unread,
Nov 15, 2024, 10:13:51 AMNov 15
to Tinode General
When I try to send a message with drafty format by using grpc . This is my payload :

pub {
  id: "43934c731d5db31bcdb74bae4972522c478e2637"
  topic: "grp5X1oXUMo6FI"
  no_echo: true
  head {
    key: "mime"
    value: "text/x-drafty"
  }
  content: "\"{\\\"txt\\\":\\\"Hello World\\\"}\""
}
extra {
  on_behalf_of: "usrshKZD9n1Hnw"
  auth_level: ROOT
}

I already set  text/x-drafty in the head but it shows drafty object as json plain text :  {"txt":"Hello World"}
12:50 AM 
Reply all
Reply to author
Forward
0 new messages