I'm just started to use Pyrogram to develop TG-Clients. for a starter, tried to pilot my scripts on [Test servers] to ensure things are fine. So created two user's account by the client-library itself (test numbers) then tried to run a sample workflow by interactions between those accounts, but seems there's no way to "meet" one with another (which is a precondition to be able to interact).
BTW:
Already tried to add_contact()
, create_group()
, send_message()
to "self" including "target-account" mentioned in the message, but all of those considered as "interactions" and follow the same scheme (target User needed to exist in the .session local file to be able to interact with).
I gonna need a way to resolve User despite having that in the .session file (something like Search User by its id/phone/username)
Any suggestion would be appreciated.
P.S:
For what it worth, the "callback code" from TG-TestServers auth workflow, recently has changed from (Five-Times DC number to Six-Times) that needs to be corrected in the docs https://docs.pyrogram.org/topics/test-servers#test-numbers
Stay Safe All
PEACE V
Asked
Active
Viewed 99 times
0

IPEN
- 41
- 2
-
You could create a group, then [create an invite link](https://docs.pyrogram.org/api/methods/create_chat_invite_link) and use that to join with the second session. That should be plenty to count as an interaction, as your first session sees the second account joining. – ColinShark May 16 '21 at 17:05
-
First, thanks for the reply. About the problem, creating a group(private/basic) requires to invite user(s) to join at the time of creation (as the users method parameter), so it needs that the peers already met! Also, it's not necessary to create invite link, created group/channel already have an invite link that can be used. The low-hanging solution, which I used, is to create a channel and then join that channel from the other session. But there's a raw-function called ResolveUsername that seems to work for the cases that we have the target Username(if any). – IPEN May 18 '21 at 12:55