Terrance/SkPy

Adding members to a group, but the incoming member is "none"

goitin opened this issue · 1 comments

goitin commented

I am able to add users to the group successfully with the following code, but the member name is "none", why?

from skpy import Skype, SkypeChats, SkypeGroupChat

# Replace your skype account and password below
sk = Skype("XXXXXXXXXX@outlook.com", "XXXXXXXx")

# Find the group you want to add the user to
group_id = "19:XXXXXXXXXXXXXXXXXXXXX@thread.skype"
group = sk.chats.chat(group_id)

# Find the user you want to add to the group
user_id = "8:XXXXXXXX"
user = sk.contacts[user_id]

# Add the user to the group
try:
    group.addMember(user)
    print("User added to the group successfully!")
except Exception as e:
    print("Error adding user to group:", e)

The code you've posted doesn't appear to read a user's name anywhere? In any case it shouldn't be related to adding a user to a group, as the resulting message only references a user by their ID, and they'll just be retrieved via SkypeContacts again.