MarshalX / tgcalls

Voice chats, private incoming and outgoing calls in Telegram for Developers
https://t.me/tgcallslib
GNU Lesser General Public License v3.0
516 stars 91 forks source link

Improve bridges #142

Closed rojvv closed 3 years ago

MarshalX commented 3 years ago

Don't confuse these two variables. They are of different types. One constant to connect, the other can be updated (in update handler). There is 2 types: InputGroupCall and GroupCall

MarshalX commented 3 years ago

If you want to use only self.group_call you need to convert it sometime to InputGroupCall before using in requests

rojvv commented 3 years ago

image self.full_chat.call is the same as self.group_call, isn't it?

MarshalX commented 3 years ago

But its not needed because we can use static value of full_chat.call. Call id can be changes only by recteating of group call. So there is no need to handle updated group calls from UpdateGroupCall update. Its necessary to handle changing settings of group call. For example "new members are muted"

If you want to use only self.group_call you need to convert it sometime to InputGroupCall before using in requests

MarshalX commented 3 years ago

image self.full_chat.call is the same as self.group_call, isn't it?

This is true until the first update is received. It is temporarily used as a value of self.group_call to be able to compare the call by ID while processing updates. To know should we handle this update or not. Because update can be received from another group call

rojvv commented 3 years ago

So why do you use it in check call if it is something temporary and not to be used?

MarshalX commented 3 years ago

So why do you use it in check call if it is something temporary and not to be used?

image
MarshalX commented 3 years ago

So why do you use it in check call if it is something temporary and not to be used?

temp is value (self.full_chat.call). Var is not a temp

rojvv commented 3 years ago

OK. What about why you don't check if self.group_call is not None in edit participant?

MarshalX commented 3 years ago

OK. What about why you don't check if self.group_call is not None in edit participant?

Because editing a participant cannot be called without joining to a call. Developers should check if the bot is on the call or not.

In turn, checking whether we are in a voice chat should always work and return a boolean. Ofc it can be called before the start of the call. For example before editing of participant)

rojvv commented 3 years ago

Alright, thanks for your information. Closing this.