Update mode user in topic

73 views
Skip to first unread message

quang phungbuu

unread,
Oct 4, 2021, 3:18:36 AM10/4/21
to Tinode General
I'm using iOS SDK. I want to update mode for user is "-JP". But user receive message is:

{"pres":{"topic":"grp4PzBfxk6wrU","what":"acs","dacs":{"given":"-P"}}} . My code is :

topic!.updateMode(uid: userId, update: "-JP")

Please help me solving this problem. Thank you for any reply.

Gene

unread,
Oct 4, 2021, 8:40:37 PM10/4/21
to Tinode General
Please show the client-side and server-side logs.

quang phungbuu

unread,
Oct 4, 2021, 11:24:36 PM10/4/21
to Tinode General
I update mode with code : topic!.updateMode(uid: userId, update: "-JP")
My log after update : {set":{"id":"108703","topic":"grpTZPN_4SJ2bY","sub":{"mode":"RWS","user":"usrqAJxQEB5hNE"}}}
Log of user is updated: {"pres":{"topic":"grpTZPN_4SJ2bY","what":"acs","dacs":{"given":"-P"}}}
I don't know why I update mode is "-JP" but log isn't related.

Vào lúc 07:40:37 UTC+7 ngày Thứ Ba, 5 tháng 10, 2021, Gene đã viết:

Gene

unread,
Oct 4, 2021, 11:46:17 PM10/4/21
to Tinode General
Please show the client-side and server-side logs. Copy the logs and post or attach them here. 
Please try to describe what you are trying to achieve and why you think it is not working. Your code snippets are not informative.

quang phungbuu

unread,
Oct 4, 2021, 11:52:30 PM10/4/21
to Tinode General
Because I'm a iOS developer I don't have log from server. My web only update UI when receive mode is "-JP". But when I want update mode is "-JP" on iOS SDK then my web receive mode is "-P". I don't find out any document iOS SDK for this case. 

Vào lúc 10:46:17 UTC+7 ngày Thứ Ba, 5 tháng 10, 2021, Gene đã viết:

Gene

unread,
Oct 5, 2021, 12:05:39 AM10/5/21
to Tinode General
If you are an iOS developer then you have access to client-side logs. Please show them.
Please try to describe what you are trying to achieve and why you think it is not working. Your code snippets are not informative.
I really cannot help you if you cannot provide more information.


quang phungbuu

unread,
Oct 5, 2021, 12:07:51 AM10/5/21
to Tinode General
Is this client logs? {set":{"id":"108703","topic":"grpTZPN_4SJ2bY","sub":{"mode":"RWS","user":"usrqAJxQEB5hNE"}}}

Vào lúc 11:05:39 UTC+7 ngày Thứ Ba, 5 tháng 10, 2021, Gene đã viết:

Gene

unread,
Oct 5, 2021, 12:26:29 AM10/5/21
to Tinode General
On Monday, October 4, 2021 at 9:07:51 PM UTC-7 quang phungbuu wrote:
Is this client logs? {set":{"id":"108703","topic":"grpTZPN_4SJ2bY","sub":{"mode":"RWS","user":"usrqAJxQEB5hNE"}}}

Yes, this is a single log entry. Show more of them, before and after this line.

quang phungbuu

unread,
Oct 5, 2021, 3:45:24 AM10/5/21
to Tinode General
This is my log :
[default] in: {"ctrl":{"id":"78003","topic":"grplXXc_WKJSXE","params":{"acs":{"want":"RWPS","given":"RWS","mode":"RWS"},"user":"usrqAJxQEB5hNE"},"code":200,"text":"ok","ts":"2021-10-05T07:43:22.662Z"}}

 This is log of user is updated:

in: {"pres":{"topic":"grplXXc_WKJSXE","what":"acs","dacs":{"given":"-P"}}} 

in: {"ctrl":{"topic":"grplXXc_WKJSXE","params":{"unsub":false},"code":205,"text":"evicted","ts":"2021-10-05T07:43:22.666Z"}} 



Vào lúc 11:26:29 UTC+7 ngày Thứ Ba, 5 tháng 10, 2021, Gene đã viết:

Gene

unread,
Oct 5, 2021, 1:23:48 PM10/5/21
to Tinode General
It looks like everything is working correctly. If you think that something is wrong, please describe what you are trying to achieve and what you expect to see.

quang phungbuu

unread,
Oct 5, 2021, 9:04:59 PM10/5/21
to Tinode General

I want log of user is 

in: {"pres":{"topic":"grplXXc_WKJSXE","what":"acs","dacs":{"given":"-JP"}}} 

What is mode I should update ?



Vào lúc 00:23:48 UTC+7 ngày Thứ Tư, 6 tháng 10, 2021, Gene đã viết:

Gene

unread,
Oct 5, 2021, 9:14:22 PM10/5/21
to Tinode General
On Tuesday, October 5, 2021 at 6:04:59 PM UTC-7 quang phungbuu wrote:

I want log of user is 

in: {"pres":{"topic":"grplXXc_WKJSXE","what":"acs","dacs":{"given":"-JP"}}} 


This makes no sense to me. This is not a valid message and it will not be sent. 
I'm sorry, I cannot help you if you cannot explain to me what you are doing. Maybe use translate.google.com to formulate your questions.

quang phungbuu

unread,
Oct 5, 2021, 10:13:09 PM10/5/21
to Tinode General
If I want mode of member in topic is "JP", what should I do?

Vào lúc 08:14:22 UTC+7 ngày Thứ Tư, 6 tháng 10, 2021, Gene đã viết:

Gene

unread,
Oct 6, 2021, 11:36:23 AM10/6/21
to Tinode General
On Tuesday, October 5, 2021 at 7:13:09 PM UTC-7 quang phungbuu wrote:
If I want mode of member in topic is "JP", what should I do?

{set":{"id":"108703","topic":"grpTZPN_4SJ2bY","sub":{"mode":"JP","user":"usrqAJxQEB5hNE"}}}

Ling Dam Tkhe

unread,
Jun 21, 2022, 11:39:55 AM6/21/22
to Tinode General
hi this request works fine, but how to restrict user to return previous access, for example 
after owner set to user JP mode, user resubscribe with RWPJAS and it receive all access again
how to restrict this?


среда, 6 октября 2021 г. в 18:36:23 UTC+3, Gene:

Gene

unread,
Jun 21, 2022, 11:42:07 AM6/21/22
to Tinode General
On Tuesday, June 21, 2022 at 8:39:55 AM UTC-7 Ling Dam Tkhe wrote:
hi this request works fine, but how to restrict user to return previous access, for example 
after owner set to user JP mode, user resubscribe with RWPJAS and it receive all access again
how to restrict this?

User cannot change the GIVEN access by resubscribing. Please show the full logs.

Ling Dam Tkhe

unread,
Jun 22, 2022, 10:50:11 AM6/22/22
to Tinode General

got thanks
вторник, 21 июня 2022 г. в 18:42:07 UTC+3, Gene:
Reply all
Reply to author
Forward
0 new messages