Module Skype :: Class Conversation

Class Conversation

source code

     object --+        
              |        
skypekit.Cached --+    
                  |    
    skypekit.Object --+
                      |
                     Conversation

The Conversation class encapsulates all types of communication possible with Skype client. Instant messaging, calls, video calls, file transfers, SMS, screen sharing - all take place within the context of a Conversation. Contacts are represented in Conversation as Participant objects. This also applies to contacts of PSTN type. All events in a conversation are represented as Message objects.

Instance Methods
 
_sk_init_(self, object_id, transport)
actual constructor
source code
 
__str__(self)
str(x)
source code
 
OnPropertyChange(self, property_name)
notifies from a property change
source code
 
SetOption(self, prop_key, value)
Setter method for Conversation option properties.
source code
 
SetTopic(self, topic, is_xml=False)
Setter for Conversation class META_TOPIC.
source code
 
SetGuidelines(self, guidelines, is_xml=False)
Setter for Conversation META_GUIDELINES.
source code
 
SetPicture(self, jpeg)
Sets the conversation's avatar to the specified JPEG image, which is propagated to both local and remote participants.
source code
 
SpawnConference(self, identities_to_add)
When called from dialog conversation, this spawns a new conversation, with existing two dialog participants plus new contact identities given in the identitiesToAdd list.
source code
 
AddConsumers(self, identities)
Takes one or more Contact identities and creates corresponding Participant objects within the context of this Conversation, which must be of type CONFERENCE.
source code
 
Assimilate(self, other_conversation)
Merges two live conversations.
source code
 
JoinLiveSession(self, access_token='')
starts, answers or joins a live session (first one to join becomes LIVE_HOST)
source code
 
RingOthers(self, identities=[], video_call=False, origin='')
This is an alternative to calling Ring method for each Participant individually.
source code
 
MuteMyMicrophone(self)
Sets VOICE_STATUS to LISTENING in the Participant instance associated with us, causing any input from our microphone to be ignored.
source code
 
UnmuteMyMicrophone(self)
Sets VOICE_STATUS to SPEAKING in the Participant instance associated with us, causing any input from our microphone to be sent to the call host.
source code
 
HoldMyLiveSession(self)
Puts the conversation on hold - Conversation LOCAL_LIVESTATUS changes to ON_HOLD_LOCALLY and to ON_HOLD_REMOTELY for remote participants.
source code
 
ResumeMyLiveSession(self)
Resumes call from local hold.
source code
 
LeaveLiveSession(self, post_voice_autoresponse=False)
Hang up or refuse to answer an incoming call.
source code
 
StartVoiceMessage(self)
Begin recording a voice mail for this conversation's remote participant.
source code
 
TransferLiveSession(self, identities, transfer_topic='')
This method is for doing call transfers.
source code
 
CanTransferLiveSession(self, identity)
Checks if the identity is available for receiving a transferred live session.
source code
 
SendDTMF(self, dtmf, length_in_ms=260)
Sends DTMF tone to a live conversation.
source code
 
StopSendDTMF(self)
Stops the current DTMF tone being played into conversation.
source code
 
SetMyTextStatusTo(self, status)
Sets local user typing indicator in the Conversation.
source code
 
PostText(self, text, is_xml=False)
Posts the specified text the conversation, and populates message with a reference to the corresponding Message object (if no error occurred during execution).
source code
 
PostContacts(self, contacts)
Takes a list of Contacts as an argument and posts the list into the Conversation.
source code
 
PostFiles(self, paths, body)
Takes a list of fully-qualified filenames and initiates corresponding file transfers in the conversation.
source code
 
PostVoiceMessage(self, voicemail, body)
Stops the active voicemail recording and sends it (dialog only)
source code
 
PostSMS(self, sms, body)
Takes an SMS instance created by Skype::CreateOutgoingSms and posts it in the conversation.
source code
 
GetJoinBlob(self)
Retrieves a binary join blob for joining public conversations, which are always of type CONFERENCE.
source code
 
Join(self)
Tries to join a public conversation (aka public chat).
source code
 
EnterPassword(self, password)
Submits password for joining password-protected conversation.
source code
 
SetPassword(self, password, hint)
Sets password protection/new password for the conversation.
source code
 
RetireFrom(self)
Leaves the conference.
source code
 
Delete(self)
Deletes this conversation, which must be of type CONFERENCE - dialogs between local user and any of his contacts are always persistant.
source code
 
RenameTo(self, name)
Changes the META_NAME property of the conversation.
source code
 
SetBookmark(self, bookmark)
Setter for Conversation class IS_BOOKMARKED.
source code
 
SetAlertString(self, alert_string)
Setter for Conversation class ALERT_STRING property.
source code
 
RemoveFromInbox(self)
Removes conversation from Inbox.
source code
 
AddToInbox(self, timestamp=0)
Sets Conversation inbox_timestamp property.
source code
 
SetConsumedHorizon(self, timestamp, also_unconsume=False)
This method can be used to set the consumption (read) status of messages in the conversation.
source code
 
MarkUnread(self)
sets consumption horizon to last inbox message id timestamp
source code
 
IsMemberOf(self, group)
Checks if the conversation is a member of the given ContactGroup
source code
 
GetParticipants(self, filter='ALL')
Retrieves the list of this conversation's current participants, which you can optionally request to be filtered.
source code
 
GetLastMessages(self, require_timestamp=0)
Returns recent messages.
source code
 
FindMessage(self, text, from_timestamp_up=4294967295)
Finds the most recent Message object in the conversation that contains the substring specified by the text argument.
source code
 
OnParticipantListChange(self)
This callback gets fired when participants join or leave the conversation.
source code
 
OnMessage(self, message)
Deprecated: Use the other OnMessage
source code
 
OnSpawnConference(self, spawned)
This callback gets fired when a new Conversation is created using SpawnConference.
source code

Inherited from skypekit.Object: multiget

Inherited from skypekit.Cached: __copy__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods
 
propid(propname)
convert a property name to the enum of the property
source code

Inherited from skypekit.Cached: __new__, sk_exists

Class Variables
  event_handlers = {1: '_sk_on_participant_list_change', 2: '_sk...
  propid2label = {902: 'type', 903: 'creator', 904: 'creation_ti...
  module_id = 18
  TYPE = {1: 'DIALOG', 2: 'CONFERENCE', 3: 'TERMINATED_CONFERENC...
DIALOG - 1:1 conversations, there is a one dialog per identity
  MY_STATUS = {1: 'CONNECTING', 2: 'RETRY_CONNECTING', 3: 'DOWNL...
CONNECTING - connecting to conference
  LOCAL_LIVESTATUS = {0: 'NONE', 1: 'STARTING', 2: 'RINGING_FOR_...
NONE - there isn't a live session
  ALLOWED_ACTIVITY = {1: 'SET_META', 2: 'ADD_CONSUMERS', 4: 'SPE...
values for opt_admin_only_activities property
  PARTICIPANTFILTER = {0: 'ALL', 1: 'CONSUMERS', 2: 'APPLICANTS'...
ALL - All participants (may included some that are RETIRED or OUTLAW, but not all of them)
  LIST_TYPE = {0: 'ALL_CONVERSATIONS', 1: 'INBOX_CONVERSATIONS',...
ALL_CONVERSATIONS - bookmarked or in_inbox or live or with_meta_info or activity in last 30 days
  P_IDENTITY = 972
  P_TYPE = 902
  P_LIVE_HOST = 918
  P_LIVE_START_TIMESTAMP = 974
  P_LIVE_IS_MUTED = 996
  P_ALERT_STRING = 920
  P_IS_BOOKMARKED = 921
  P_GIVEN_DISPLAYNAME = 925
  P_DISPLAYNAME = 924
  P_LOCAL_LIVESTATUS = 927
  P_INBOX_TIMESTAMP = 928
  P_INBOX_MESSAGE_ID = 973
  P_UNCONSUMED_SUPPRESSED_MESSAGES = 975
  P_UNCONSUMED_NORMAL_MESSAGES = 976
  P_UNCONSUMED_ELEVATED_MESSAGES = 977
  P_UNCONSUMED_MESSAGES_VOICE = 970
  P_ACTIVE_VM_ID = 971
  P_CONSUMPTION_HORIZON = 979
  P_LAST_ACTIVITY_TIMESTAMP = 981
  P_SPAWNED_FROM_CONVO_ID = 915
  P_CREATOR = 903
  P_CREATION_TIMESTAMP = 904
  P_MY_STATUS = 919
  P_OPT_JOINING_ENABLED = 922
  P_OPT_ENTRY_LEVEL_RANK = 906
  P_OPT_DISCLOSE_HISTORY = 907
  P_OPT_ADMIN_ONLY_ACTIVITIES = 909
  P_PASSWORDHINT = 980
  P_META_NAME = 910
  P_META_TOPIC = 911
  P_META_GUIDELINES = 913
  P_META_PICTURE = 914
  SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION = 'Lib/Conversation/Enab...
  SETUPKEY_INBOX_UPDATE_TIMEOUT = 'Lib/Conversation/InboxUpdateT...
  SETUPKEY_RECENTLY_LIVE_TIMEOUT = 'Lib/Conversation/RecentlyLiv...
  SETUPKEY_DISABLE_CHAT = 'Lib/Chat/DisableChat'
  SETUPKEY_DISABLE_CHAT_HISTORY = 'Lib/Message/DisableHistory'
  SETUPKEY_CHAT_HISTORY_DAYS = 'Lib/Chat/HistoryDays'
  SETUPKEY_CHATDB_LIMIT_KB = 'Lib/Chat/ChatDBLimitKb'
  SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION = 'Lib/Chat/DisableA...
  SETUPKEY_CALL_NOANSWER_TIMEOUT = 'Lib/Call/NoAnswerTimeout'
  SETUPKEY_CALL_SEND_TO_VM = 'Lib/Call/SendToVM'
  SETUPKEY_CALL_APPLY_CF = 'Lib/Call/ApplyCF'
  SETUPKEY_CALL_EMERGENCY_COUNTRY = 'Lib/Call/EmergencyCountry'

Inherited from skypekit.Object: rwlock

Instance Variables

Inherited from skypekit.Object: properties

Properties
  identity
contact identity in case of dialogs, chat name in case of conferences
  type
type of the conversation
  live_host
host of current live session.
  live_start_timestamp
moment when first participant other than host joined the current or last live session
  live_is_muted
if live session is muted
  alert_string
'' everything matches, '=' nothing matches, '=string' string matches
  is_bookmarked
if conversation is bookmarked/flagged
  given_displayname
name assigned via GiveDisplayname
  displayname
resulting display name of the conversation (based on given name, topic, participant list, etc)
  local_livestatus
if the conversation is live and in which status it is then
  inbox_timestamp
timestamp to sort the conversations in inbox by.
  inbox_message_id
ID of the message that caused INBOX_TIMESTAMP to be set
  unconsumed_suppressed_messages
number of messages in UNCONSUMED_SUPPRESSED consumption status
  unconsumed_normal_messages
number of messages in UNCONSUMED_NORMAL consumption status
  unconsumed_elevated_messages
DEPRECATED, not set anymore
  unconsumed_messages_voice
if there are unconsumed voice or call messages in the conversation
  active_vm_id
ID of voice message that is being played or recorded in this conversation
  consumption_horizon
consumption cutoff timestamp: messages after (but not including) this are considered unconsumed
  last_activity_timestamp
timestamp of last activity in conversation
  spawned_from_convo_id
dialog this conference was spawned from
  creator
identity of conversation creator (doesn't apply to dialogs)
  creation_timestamp
timestamp of creation (doesn't apply to dialogs)
  my_status
my status in this conversation (connecting, participating, retired, etc) (doesn't apply to dialogs)
  opt_joining_enabled
if it's a public conversation (doesn't apply to dialogs)
  opt_entry_level_rank
rank that is auto-assigned at join (doesn't apply to dialogs)
  opt_disclose_history
if history visible to new consumers (doesn't apply to dialogs)
  opt_admin_only_activities
activities that only ADMIN can do.
  passwordhint
public conversation password hint, use SetPassword to set (doesn't apply to dialogs)
  meta_name
user-set name, separate from topic (doesn't apply to dialogs)
  meta_topic
conversation topic (doesn't apply to dialogs)
  meta_guidelines
guidelines (doesn't apply to dialogs)
  meta_picture
conversation picture, in jpeg format (doesn't apply to dialogs)

Inherited from object: __class__

Method Details

_sk_init_(self, object_id, transport)

source code 

actual constructor

Overrides: skypekit.Object._sk_init_

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

SetOption(self, prop_key, value)

source code 

Setter method for Conversation option properties. Option properties are all Conversation properties starting with OPT_ prefix.

Arguments:

  • prop_key - Conversation property key, for example: Conversation::OPT_JOINING_ENABLED
  • value - New value for the option property.

SetTopic(self, topic, is_xml=False)

source code 

Setter for Conversation class META_TOPIC. This topic will be set for remote participants as well.

Arguments:

  • topic - New conversation topic.
  • is_xml - Notifies remote UIs that the new topic contains xml tags.

SetGuidelines(self, guidelines, is_xml=False)

source code 

Setter for Conversation META_GUIDELINES. This property will be visible to remote participants of the conversation.

Arguments:

  • guidelines - New value for the META_GUIDELINES property.
  • is_xml - Set true to notify remote UIs that the new guideline contains XML tags.

SetPicture(self, jpeg)

source code 

Sets the conversation's avatar to the specified JPEG image, which is propagated to both local and remote participants. Before calling this method, you should use Skype::ValidateAvatar to verify that jpeg references a valid JPEG image.

Arguments:

  • jpeg - Conversation avatar binary.

SpawnConference(self, identities_to_add)

source code 

When called from dialog conversation, this spawns a new conversation, with existing two dialog participants plus new contact identities given in the identitiesToAdd list. You do not need to add existing dialog participants to the string list. In fact, passing only the existing participants in the identities list will cause the method call to fail (return false), the same as if the list was empty. This method will also return false if the original conversation was not a dialog (contained more than two participants). Also note that this method always creates a new Conversation - even if a conversation with exactly the same participant list existed before.

Arguments:

  • identities_to_add - String list of additional participant identities. You do not need to add existing two participants from the original dialog to this list.

Return values:

  • conference - Returns the resulting conversation or 0 if the method call failed.

AddConsumers(self, identities)

source code 

Takes one or more Contact identities and creates corresponding Participant objects within the context of this Conversation, which must be of type CONFERENCE. If you have an existing dialog conversation, use SpawnConference instead.

Arguments:

  • identities - Contact identities to be added to the Conversation.

Assimilate(self, other_conversation)

source code 

Merges two live conversations. For example, if the user already has a live conversation up - let's call it conversation A. Then a new incoming call occurs - another conversation obtains LOCAL_LIVESTATUS == Conversation::RINGING_FOR_ME, let's call it conversation B. The user wishes to pick up the new incoming call and add it to the existing one. For this you can first call B->JoinLiveSession and then merge two calls with A->Assimilate(B, A). The second argument will return the merged conversation. Note that there are actually three conversation objects involved: A (before merge), B and C (after the merge). Normally it would make sense to have the first conversation (A) as the second argument, so that it gets overwritten with the assimilation result.

Arguments:

  • other_conversation - The new conversation to be merged with the one already in live state.

Return values:

  • conversation - Returns a 3rd live conversation, result of merging two existing ones.

JoinLiveSession(self, access_token='')

source code 

starts, answers or joins a live session (first one to join becomes LIVE_HOST)

Arguments:

  • access_token - if starting a live session, allows to set a custom access token

RingOthers(self, identities=[], video_call=False, origin='')

source code 

This is an alternative to calling Ring method for each Participant individually. This also works with dialogs (with identities containing only one item).

Arguments:

  • identities - List of Participants to ring. Leaving the list empty will result in ringing all participants of at least speaker level.
  • video_call - If true, indicates that we want to do a video call (video still needs to be separately enabled)
  • origin - When call is initiated from web link, this argument must contain the URI that was used

MuteMyMicrophone(self)

source code 

Sets VOICE_STATUS to LISTENING in the Participant instance associated with us, causing any input from our microphone to be ignored. This is a Conversation class method, rather than Participant class, because this only applies to local participant.

UnmuteMyMicrophone(self)

source code 

Sets VOICE_STATUS to SPEAKING in the Participant instance associated with us, causing any input from our microphone to be sent to the call host. This is a Conversation class method, rather than Participant class, because this only applies to local participant.

LeaveLiveSession(self, post_voice_autoresponse=False)

source code 

Hang up or refuse to answer an incoming call. Set postVoiceAutoresponse to true to enable a caller to leave a voicemail message.

Arguments:

  • post_voice_autoresponse

StartVoiceMessage(self)

source code 

Begin recording a voice mail for this conversation's remote participant. Applies to conversations of type DIALOG only.

TransferLiveSession(self, identities, transfer_topic='')

source code 

This method is for doing call transfers. NB! Call transfers only work in one-on-one conversations (dialogs). Before attempting call transfer, you should check availability of transfer recipients with Conversation class CanTransferLiveSession method. If the current conversation has a live session up, that session (call) will be transferred to targets specified in the identities list. Note that identities is a string list - all identities in that list will get incoming calls. The first one of them to pick up the call - wins, and rest of the transfer targets will stop ringing.

Let's take a closer look how this works in practice. We have three call participants involved in the process, and two separate conversations. Let there be three callers: Caller A (call originator), Caller B (transferor) and Caller C (recipient of transfer).

  • Caller A - calls Caller B; Caller B picks up the call - live conversation C1 is now up with A and B in it.
  • After awhile, Caller B initiates call transfers to Caller C (and optionally to Callers D, E, F.. ). LOCAL_LIVESTATUS of C1 will get set to TRANSFERRING for both A and B.
  • Caller C picks up the call. Conversation C1 will go off live status. For Caller B, conversation C1 LOCAL_LIVESTATUS will change to RECENTLY_LIVE. Another live conversation - C2 gets spawned, with Caller A and Caller C in it. For caller C, participant object representing caller A will have TRANSFERRED_BY property set to identity of caller A. For Caller B (in now no longer live conversation C1), participant object representing caller A gets its TRANSFERRED_TO property set to identity of caller C.

    Arguments:

    • identities - String list of transfer target identities. As soon as first one in this list picks up the call, others will stop ringing.
    • transfer_topic - Optional conversation topic. This value will get set as META_TOPIC property of the conversation at the transferee end. Note that this is the only case where META_TOPIC field is used in context of dialog conversations. Thus assumption that remote UI will display topic field in case of dialogs may not be 100% correct.

CanTransferLiveSession(self, identity)

source code 

Checks if the identity is available for receiving a transferred live session. If you are going to attempt to go for multiple transfer targets, you should use this check for all the target identities.

Arguments:

  • identity - Target identity.

Return values:

  • result - Returns true if call transfer to given target is possible.

SendDTMF(self, dtmf, length_in_ms=260)

source code 

Sends DTMF tone to a live conversation.

Arguments:

  • dtmf - Outgoing dtmf tone, possible values come from Participant::DTMF enumerator.
  • length_in_ms - Duration in milliseconds. Defaults to 260 ms. Note that the DTMF tone can be also cancelled with Conversation::StopSendDTMF method.

StopSendDTMF(self)

source code 

Stops the current DTMF tone being played into conversation. For example, use this method to cancel DTMF signals started with Conversation::SendDTMF before the duration given in lengthInMS runs out.

SetMyTextStatusTo(self, status)

source code 

Sets local user typing indicator in the Conversation. Remote Participants can display these in their UI.

Arguments:

  • status - Typing indicator status value - Participant::TEXT_STATUS

PostText(self, text, is_xml=False)

source code 

Posts the specified text the conversation, and populates message with a reference to the corresponding Message object (if no error occurred during execution). The isXML argument can be used if the client UI has already taken care of converting message text to xml (for example, your UI might enable users to use bold tags in text messages.)

Arguments:

  • text - Text value of the outgoing message (gets set as BODY_XML property of the Message object).
  • is_xml - For cases where the text argument was already encoded as xml message.

Return values:

  • message - Returns the Message object created as a result of this method (if successful).

PostContacts(self, contacts)

source code 

      Takes a list of Contacts as an argument and posts the list into the Conversation. The purpose of this feature is to enable sharing contacts between users, without resorting to contact search. Instead, if user A has contacts B and C, he can post contact C into chat with contact B. At this point, Contact B can add contact C to his contact list. From remote side, the posted contacts will appear as messages with type Message::POSTED_CONTACTS appearing in the conversation. The UI should allow adding these contacts from messages with this type into the contact list. 
      
      The list of posted contacts can be retrieved with the Message::GetContacts method. 
      
      Additionally, the UI then can parse the posted Contact data out of the Message::P_BODY_XML property. The list of contacts is wrapped between <contacts ..> </contacts> tags. Each contact item in the xml has following format: 
      
- t - contact type. "s" - skype contact; "p" - phone number; 
      
- s - skypename, present only in skypename contacts (t="s") 
      
- p - phone number, present only in phone number contacts (t="p") 
      
- f - contact's full name, if available 
      
- d - contact's display name, if available 
      
      Note that only the type (t) field is mandatory. Depending on type, either skypename (s) or phone number (p) fields are always present. Full name and display name fields are optional. 
      
      Example BODY_XML with skypname contact: 
      ::
      
<contacts alt="alt text"><c t="s" s="skypename" f="full name"/></contacts> 
       
      
      Example BODY_XML with PSTN contact: 
      ::
      
<contacts alt="alt text"><c t="p" p="+37212345678" d="Some PSTN number"/></contacts> 
       
      
      Example BODY_XML with multiple contacts: 
      ::
      
<contacts alt="alt text"><c t="p" p="+37212345678" d="Some PSTN number"/><c t="s" s="someskypename"/></contacts> 
       
      
      
      B{Arguments:}
       - B{contacts} - List of Contact objects, to be posted in the conversation. 
      
      

PostFiles(self, paths, body)

source code 

Takes a list of fully-qualified filenames and initiates corresponding file transfers in the conversation. From the remote side, incoming file transfers will appear as a conversation message with type POSTED_FILES. Once such a message is detected, the list of file transfer objects can be retrieved with Message::GetTransfers. At that point, remote participants will need to accept or decline those transfers.

Arguments:

  • paths - list of fully-qualified filenames to be transferred
  • body - Optional BODY_XML property for POSTED_FILES type messages that show up in remote UI.

Return values:

  • error_code - Error code, possible values come from the TRANSFER_SENDFILE_ERROR enumerator. This will be set for the first failed fail. The failed file is identified in the error_file return argument.
  • error_file - Filename of the file that triggered error.

PostVoiceMessage(self, voicemail, body)

source code 

Stops the active voicemail recording and sends it (dialog only)

Arguments:

  • voicemail - This argument is deprecated as of SDK version 3.2. Instead of manually constructing Voicemail object, you can call Conversation::StartVoiceMessage method to start recording a voicemail in context of a dialog. PostVoiceMessage will stop recording this voicemail and post it in the dialog. If instead of sending Voicemail, the user decides to cancel it, you should use Conversation::LeaveLiveSession method (Voicemail::Cancel is deprecated).
  • body - Optional text message that remote UI can display in conversation, to notify the user of a new voicemail.

PostSMS(self, sms, body)

source code 

Takes an SMS instance created by Skype::CreateOutgoingSms and posts it in the conversation. Note that you will need to set both Sms body text (Sms::SetBody) and recipient list (Sms::SetTargets) before you can post the object.

Arguments:

  • sms - SMS object.
  • body - This argument is currently ignored. The message text needs to be set with Sms::SetBody method, prior to passing the Sms object to this method

GetJoinBlob(self)

source code 

      Retrieves a binary join blob for joining public conversations, which are always of type CONFERENCE. If called for a dialog, the blob argument will contain the empty string. The best way to create a Public Chat is to first create a fresh conversation with Skype class CreateConference, then minimally apply the public chat options OPT_JOINING_ENABLED and OPT_ENTRY_LEVEL_RANK - options, like this (C++): 
      ::
      
C->SetOption(Conversation::OPT_JOINING_ENABLED, true); 
       
      
      When that is done, you can call GetJoinBlob to retrieve the blob string. Use the blob string to generate and post an HTML link whose href attribute looks like this: href="skype:?chat&blob=_BLOB_GOES_HERE" A person running Skype desktop client can click this link to join the conversation and have that conversation opened in his UI. Note that the conversation host (creator) needs to be online for new joiners-via-link to start participating in the Public Chat.
      
      B{Return values:}
       - B{blob} - Returns the public conversation join blob. 
      
      

Join(self)

source code 

Tries to join a public conversation (aka public chat). This method is only useful if you have used Skype::GetConversationByBlob method with alsoJoin argument set to false.

EnterPassword(self, password)

source code 

Submits password for joining password-protected conversation.

Arguments:

  • password - Password string.

SetPassword(self, password, hint)

source code 

Sets password protection/new password for the conversation.

Arguments:

  • password - New password.
  • hint - Password hint.

RetireFrom(self)

source code 

Leaves the conference. Not applicable to dialogs.

Delete(self)

source code 

Deletes this conversation, which must be of type CONFERENCE - dialogs between local user and any of his contacts are always persistant. Note that this also removes corresponding Message and Participant objects.

RenameTo(self, name)

source code 

Changes the META_NAME property of the conversation. Note that unlike topic and guidelines, this rename is just local - remote participants can have their own private names for conversations.

Arguments:

  • name - New name for the conversation. Passing an empty string in this argument causes the META_NAME to unset.

SetBookmark(self, bookmark)

source code 

Setter for Conversation class IS_BOOKMARKED.

Arguments:

  • bookmark - Set true to set the bookmark, false to remove the bookmark.

SetAlertString(self, alert_string)

source code 

Setter for Conversation class ALERT_STRING property. The main use of this property is checking bodies of incoming messages in the conversation for the alert string and producing notifications in UI for the user, when appropriate.

Arguments:

  • alert_string - Substring to check in BODY_XML property of incoming messages.

AddToInbox(self, timestamp=0)

source code 

Sets Conversation inbox_timestamp property. If the timestamp argument is left empty or is greater than conversation consumption horizon, then the conversation will be restored to the inbox.

Arguments:

  • timestamp - If left empty or set to 0, the inbox_timestamp property is set to current time.

SetConsumedHorizon(self, timestamp, also_unconsume=False)

source code 

This method can be used to set the consumption (read) status of messages in the conversation. It sets Message::CONSUMPTION_STATUS to Message::CONSUMED for all messages in the conversation, older than the given timestamp. If the second argument is set to true, it also modifies messages more recent than the timestamp, by marking them as unconsumed.

Arguments:

  • timestamp - Consumption cutoff timestamp. Setting this to current time will mark all messages in the conversation as consumed.
  • also_unconsume - If set to true, this also marks messages newer than the cutoff timestamp as unconsumed. For example, setting timestamp to 0 and also_unconsumed to true, will unconsume all messages in the conversation.

IsMemberOf(self, group)

source code 

Checks if the conversation is a member of the given ContactGroup

Arguments:

  • group - ContactGroup

Return values:

  • result - True if this conversation is a member of the ContactGroup specified by the group argument contains the conversation

GetParticipants(self, filter='ALL')

source code 

Retrieves the list of this conversation's current participants, which you can optionally request to be filtered. If no Participants pass the filter, an empty list will be returned (the method itself still returns true).

Arguments:

  • filter - Conversation::PARTICIPANTFILTER - defaults to Conversation::ALL

Return values:

  • participants - List of conversation Participant objects that passed the filter.

GetLastMessages(self, require_timestamp=0)

source code 

Returns recent messages. The messages are returned in two lists - new messages (unconsumed) and recent message history (context messages). The context message list contains messages that are already above the consumption horizon but are fairly recent, making it likely that displaying them in UI would be good default behaviour.

Arguments:

  • require_timestamp - If set to a non-zero value, includes messages no earlier than this timestamp, if not, includes messages from the last 24 hours only

Return values:

  • context_messages - Already consumed messages, provided for context
  • unconsumed_messages - Unconsumed messages

FindMessage(self, text, from_timestamp_up=4294967295)

source code 

Finds the most recent Message object in the conversation that contains the substring specified by the text argument. If no matching messages are found, this method will return false. The search proceeds backwards in time, starting from the timestamp argument. To continue searching, you can start with timestamp=MAX_UINT, retrieve the TIMESTAMP property of the matching message, decrement it by one, and submit it as timestamp for the next FindMessage call.

Arguments:

  • text - Substring to search for.
  • from_timestamp_up

Return values:

  • message - Returns matching message or 0 if there was no match. As the likelihood of this object being invalid is quite high, you should always check for method return value before you start calling methods of this object.

OnMessage(self, message)

source code 

Deprecated: Use the other OnMessage

Return values:

  • message

OnSpawnConference(self, spawned)

source code 

This callback gets fired when a new Conversation is created using SpawnConference.

Return values:

  • spawned - Conversation object that got created.

Class Variable Details

event_handlers

Value:
{1: '_sk_on_participant_list_change',
 2: '_sk_on_message',
 3: '_sk_on_spawn_conference'}

propid2label

Value:
{902: 'type',
 903: 'creator',
 904: 'creation_timestamp',
 906: 'opt_entry_level_rank',
 907: 'opt_disclose_history',
 909: 'opt_admin_only_activities',
 910: 'meta_name',
 911: 'meta_topic',
...

TYPE

  • DIALOG - 1:1 conversations, there is a one dialog per identity
  • CONFERENCE - equivalent of a multichat
  • TERMINATED_CONFERENCE - a conference that has been terminated (disbanded chat)
  • LEGACY_VOICE_CONFERENCE - voice-only conference, when host is using a legacy non-conversation client
  • LEGACY_SHAREDGROUP - chat used for legacy shared groups, can be ignored
Value:
{1: 'DIALOG',
 2: 'CONFERENCE',
 3: 'TERMINATED_CONFERENCE',
 4: 'LEGACY_VOICE_CONFERENCE',
 5: 'LEGACY_SHAREDGROUP',
 'CONFERENCE': 2,
 'DIALOG': 1,
 'LEGACY_SHAREDGROUP': 5,
...

MY_STATUS

  • CONNECTING - connecting to conference
  • RETRY_CONNECTING
  • DOWNLOADING_MESSAGES - unused
  • QUEUED_TO_ENTER - conference is full for now, being queued
  • APPLICANT - I'm applying to join the conference
  • APPLICATION_DENIED - My application to join the conference was denied
  • INVALID_ACCESS_TOKEN - The password I provided is incorrect
  • CONSUMER - I'm part of the conference, I can participate
  • RETIRED_FORCEFULLY - I was kicked from the conference
  • RETIRED_VOLUNTARILY - I left the conference
Value:
{1: 'CONNECTING',
 2: 'RETRY_CONNECTING',
 3: 'DOWNLOADING_MESSAGES',
 4: 'QUEUED_TO_ENTER',
 5: 'APPLICANT',
 6: 'APPLICATION_DENIED',
 7: 'INVALID_ACCESS_TOKEN',
 8: 'CONSUMER',
...

LOCAL_LIVESTATUS

  • NONE - there isn't a live session
  • STARTING - trying to start or join a live session
  • RINGING_FOR_ME - there is a live session ringing
  • IM_LIVE - the conference is live for me
  • ON_HOLD_LOCALLY - I put the live session on hold
  • ON_HOLD_REMOTELY - the live session was put on hold by someone else
  • OTHERS_ARE_LIVE - there is a live session on-going, I'm not participating but I could join
  • OTHERS_ARE_LIVE_FULL - there is a live session on-going without me, but I can't join because it's full
  • PLAYING_VOICE_MESSAGE - playing a voicemail (dialog only)
  • RECORDING_VOICE_MESSAGE - recording a voicemail (dialog only)
  • RECENTLY_LIVE - a live session just finished, we stay in this state for RECENTLY_LIVE_TIMEOUT setup key
  • TRANSFERRING - call is being transferred
Value:
{0: 'NONE',
 1: 'STARTING',
 2: 'RINGING_FOR_ME',
 3: 'IM_LIVE',
 5: 'ON_HOLD_LOCALLY',
 6: 'ON_HOLD_REMOTELY',
 7: 'OTHERS_ARE_LIVE',
 8: 'PLAYING_VOICE_MESSAGE',
...

ALLOWED_ACTIVITY

values for opt_admin_only_activities property

  • SET_META - allowed to set the CONVERSATION_META properties
  • ADD_CONSUMERS - allowed to add participants to the conference
  • SPEAK - allowed to speak, but not write
  • SPEAK_AND_WRITE - allowed to speak and write
Value:
{1: 'SET_META',
 2: 'ADD_CONSUMERS',
 4: 'SPEAK',
 8: 'SPEAK_AND_WRITE',
 'ADD_CONSUMERS': 2,
 'SET_META': 1,
 'SPEAK': 4,
 'SPEAK_AND_WRITE': 8}

PARTICIPANTFILTER

  • ALL - All participants (may included some that are RETIRED or OUTLAW, but not all of them)
  • CONSUMERS - Participants that can receive messages, including myself
  • APPLICANTS - Only people who are applying to join the conversation
  • CONSUMERS_AND_APPLICANTS - Consumers and applicants
  • MYSELF - Myself
  • OTHER_CONSUMERS - All consumers except myself
Value:
{0: 'ALL',
 1: 'CONSUMERS',
 2: 'APPLICANTS',
 3: 'CONSUMERS_AND_APPLICANTS',
 4: 'MYSELF',
 5: 'OTHER_CONSUMERS',
 'ALL': 0,
 'APPLICANTS': 2,
...

LIST_TYPE

  • ALL_CONVERSATIONS - bookmarked or in_inbox or live or with_meta_info or activity in last 30 days
  • INBOX_CONVERSATIONS - only last 6 months conversations are kept there
  • BOOKMARKED_CONVERSATIONS - is_bookmarked is set
  • LIVE_CONVERSATIONS - local_livestatus is different from NONE
  • REALLY_ALL_CONVERSATIONS - all conversations, without any of the limits of ALL_CONVERSATIONS
Value:
{0: 'ALL_CONVERSATIONS',
 1: 'INBOX_CONVERSATIONS',
 2: 'BOOKMARKED_CONVERSATIONS',
 3: 'LIVE_CONVERSATIONS',
 5: 'REALLY_ALL_CONVERSATIONS',
 'ALL_CONVERSATIONS': 0,
 'BOOKMARKED_CONVERSATIONS': 2,
 'INBOX_CONVERSATIONS': 1,
...

SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION

Value:
'Lib/Conversation/EnableBirthday'

SETUPKEY_INBOX_UPDATE_TIMEOUT

Value:
'Lib/Conversation/InboxUpdateTimeout'

SETUPKEY_RECENTLY_LIVE_TIMEOUT

Value:
'Lib/Conversation/RecentlyLiveTimeout'

SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION

Value:
'Lib/Chat/DisableActivityIndication'

Property Details

identity

contact identity in case of dialogs, chat name in case of conferences

Get Method:
_sk_get_identity(self) - contact identity in case of dialogs, chat name in case of conferences

type

type of the conversation

Get Method:
_sk_get_type(self) - type of the conversation

live_host

host of current live session. none => no session. myself in case of 1:1 calls

Get Method:
_sk_get_live_host(self) - host of current live session.

live_start_timestamp

moment when first participant other than host joined the current or last live session

Get Method:
_sk_get_live_start_timestamp(self) - moment when first participant other than host joined the current or last live session

live_is_muted

if live session is muted

Get Method:
_sk_get_live_is_muted(self) - if live session is muted

alert_string

'' everything matches, '=' nothing matches, '=string' string matches

Get Method:
_sk_get_alert_string(self) - '' everything matches, '=' nothing matches, '=string' string matches

is_bookmarked

if conversation is bookmarked/flagged

Get Method:
_sk_get_is_bookmarked(self) - if conversation is bookmarked/flagged

given_displayname

name assigned via GiveDisplayname

Get Method:
_sk_get_given_displayname(self) - name assigned via GiveDisplayname

displayname

resulting display name of the conversation (based on given name, topic, participant list, etc)

Get Method:
_sk_get_displayname(self) - resulting display name of the conversation (based on given name, topic, participant list, etc)

local_livestatus

if the conversation is live and in which status it is then

Get Method:
_sk_get_local_livestatus(self) - if the conversation is live and in which status it is then

inbox_timestamp

timestamp to sort the conversations in inbox by. 0 means not in inbox

Get Method:
_sk_get_inbox_timestamp(self) - timestamp to sort the conversations in inbox by.

inbox_message_id

ID of the message that caused INBOX_TIMESTAMP to be set

Get Method:
_sk_get_inbox_message_id(self) - ID of the message that caused INBOX_TIMESTAMP to be set

unconsumed_suppressed_messages

number of messages in UNCONSUMED_SUPPRESSED consumption status

Get Method:
_sk_get_unconsumed_suppressed_messages(self) - number of messages in UNCONSUMED_SUPPRESSED consumption status

unconsumed_normal_messages

number of messages in UNCONSUMED_NORMAL consumption status

Get Method:
_sk_get_unconsumed_normal_messages(self) - number of messages in UNCONSUMED_NORMAL consumption status

unconsumed_elevated_messages

DEPRECATED, not set anymore

Get Method:
_sk_get_unconsumed_elevated_messages(self) - DEPRECATED, not set anymore

unconsumed_messages_voice

if there are unconsumed voice or call messages in the conversation

Get Method:
_sk_get_unconsumed_messages_voice(self) - if there are unconsumed voice or call messages in the conversation

active_vm_id

ID of voice message that is being played or recorded in this conversation

Get Method:
_sk_get_active_vm_id(self) - ID of voice message that is being played or recorded in this conversation

consumption_horizon

consumption cutoff timestamp: messages after (but not including) this are considered unconsumed

Get Method:
_sk_get_consumption_horizon(self) - consumption cutoff timestamp: messages after (but not including) this are considered unconsumed

last_activity_timestamp

timestamp of last activity in conversation

Get Method:
_sk_get_last_activity_timestamp(self) - timestamp of last activity in conversation

spawned_from_convo_id

dialog this conference was spawned from

Get Method:
_sk_get_spawned_from_convo_id(self) - dialog this conference was spawned from

creator

identity of conversation creator (doesn't apply to dialogs)

Get Method:
_sk_get_creator(self) - identity of conversation creator (doesn't apply to dialogs)

creation_timestamp

timestamp of creation (doesn't apply to dialogs)

Get Method:
_sk_get_creation_timestamp(self) - timestamp of creation (doesn't apply to dialogs)

my_status

my status in this conversation (connecting, participating, retired, etc) (doesn't apply to dialogs)

Get Method:
_sk_get_my_status(self) - my status in this conversation (connecting, participating, retired, etc) (doesn't apply to dialogs)

opt_joining_enabled

if it's a public conversation (doesn't apply to dialogs)

Get Method:
_sk_get_opt_joining_enabled(self) - if it's a public conversation (doesn't apply to dialogs)

opt_entry_level_rank

rank that is auto-assigned at join (doesn't apply to dialogs)

Get Method:
_sk_get_opt_entry_level_rank(self) - rank that is auto-assigned at join (doesn't apply to dialogs)

opt_disclose_history

if history visible to new consumers (doesn't apply to dialogs)

Get Method:
_sk_get_opt_disclose_history(self) - if history visible to new consumers (doesn't apply to dialogs)

opt_admin_only_activities

activities that only ADMIN can do. Bitmap of ALLOWED_ACTIVITY values (doesn't apply to dialogs)

Get Method:
_sk_get_opt_admin_only_activities(self) - activities that only ADMIN can do.

passwordhint

public conversation password hint, use SetPassword to set (doesn't apply to dialogs)

Get Method:
_sk_get_passwordhint(self) - public conversation password hint, use SetPassword to set (doesn't apply to dialogs)

meta_name

user-set name, separate from topic (doesn't apply to dialogs)

Get Method:
_sk_get_meta_name(self) - user-set name, separate from topic (doesn't apply to dialogs)

meta_topic

conversation topic (doesn't apply to dialogs)

Get Method:
_sk_get_meta_topic(self) - conversation topic (doesn't apply to dialogs)

meta_guidelines

guidelines (doesn't apply to dialogs)

Get Method:
_sk_get_meta_guidelines(self) - guidelines (doesn't apply to dialogs)

meta_picture

conversation picture, in jpeg format (doesn't apply to dialogs)

Get Method:
_sk_get_meta_picture(self) - conversation picture, in jpeg format (doesn't apply to dialogs)