aMSN Forums
June 19, 2013, 03:26:52 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: New name for pymsn : Papyon  (Read 18211 times)
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #15 on: June 23, 2009, 06:59:36 pm »

Hi arantes, welcome to the forums!
Credits for the new name goes to Pierre-Luc Beaudoin, a collegue from work (Collabora). And as the name suggests, he is francophone (from Quebec).
Logged

KaKaRoTo
yelo3
Newbie

Offline Offline

Posts: 4


View Profile
« Reply #16 on: June 27, 2009, 11:05:26 am »

Is it possible to have a place where to file bugs and feature requests?
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #17 on: June 27, 2009, 09:22:25 pm »

hi, welcome to the forums,
yes.. probably at some point in the future we'll set up something for that.. but for now, you can either report issues (with papyon, not with amsn2) in this forum, or talk to us in the #papyon channel on irc.freenode.net
Logged

KaKaRoTo
yelo3
Newbie

Offline Offline

Posts: 4


View Profile
« Reply #18 on: June 27, 2009, 09:56:34 pm »

Ok, thanks! are you going to support MSNP18 ? (msn-sharp has a developement version which supports this, if you want some code)
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #19 on: June 28, 2009, 02:23:06 am »

Yes we will.. amsn supports it (partially) since it first got out (actually, since WLM 9 was still in early beta).. and we have papyon changes to support MSNP19.. the problem is with MSNP2PV2 which will be added sometime in the future, after properly reverse engineering it.
Logged

KaKaRoTo
yelo3
Newbie

Offline Offline

Posts: 4


View Profile
« Reply #20 on: July 01, 2009, 02:15:14 pm »

Hi back, I think I found a bug.
I'm not directly running papyon but I'm running pymsn with some patches applied (from papyon of course).
I get an error when connecting, related to an offline message (I'm using it through telepathy butterfly):

Code:
DEBUG:Transport:<<< CHG 9 HDN 1879048192
DEBUG:Transport:<<< CHG 9 HDN 1879048192
DEBUG:Transport:<<< MSG Hotmail Hotmail
MIME-Version: 1.0\r\n
Content-Type: text/x-msmsgsinitialmdatanotification; charset=UTF-8\r\n
\r\n
Mail-Data: <MD><E><I>0</I><IU>0</IU><O>0</O><OU>0</OU></E><Q><QTM>409600</QTM><QNM>204800</QNM></Q><M><T>11</T><S>7</S><RT>2009-06-29T10:39:02.807Z</RT><RS>0</RS><SZ>995</SZ><E>PRIVACY_REMOVED_BY_ME@gmail.com</E><I>3EA642F7-FECF-46CA-A12C-759D8171D16F</I><F>00000000-0000-0000-0000-000000000009</F><N>PRIVACY_REMOVED_BY_ME@gmail.com</N></M></MD>\r\n
Inbox-URL: /cgi-bin/HoTMaiL\r\n
Folders-URL: /cgi-bin/folders\r\n
Post-URL: http://www.hotmail.com\r\n
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/pymsn/msnp/base.py", line 106, in _dispatch_command
    handler(command)
  File "/usr/lib/python2.6/dist-packages/pymsn/msnp/notification.py", line 485, in _handle_MSG
    self._client.oim_box.sync(mail_data)
  File "/usr/lib/python2.6/dist-packages/pymsn/service/OfflineIM/offline_messages_box.py", line 247, in sync
    self.__parse_metadata(xml_data)
  File "/usr/lib/python2.6/dist-packages/pymsn/service/OfflineIM/offline_messages_box.py", line 278, in __parse_metadata
    name += part[0].decode(part[1])
TypeError: decode() argument 1 must be string, not None


And this is the code that I have in /usr/share/pyshared/pymsn/service/OfflineIM/offline_messages_box.py that should be the same of papyon:

Code:
   def __parse_metadata(self, xml_data):
        metadata = Metadata(xml_data)
        for m in metadata.findall('./M'):
            id = m.findtext('./I')
            network = m.findtext('T','int')
            if network == 11:
                network_id = NetworkID.MSN
            elif network == 13:
                network_id = NetworkID.EXTERNAL
            else:
                # FIXME: Setting a default value for network_id. Is NetworkID.MSN the correct value?
                network_id = NetworkID.MSN

            account = m.findtext('./E')

            try:
                sender = self._client.address_book.contacts.\
                    search_by_account(account).\
                    search_by_network_id(network_id)[0]
            except IndexError:
                sender = None

            # Get the name of the sender
            name = m.findtext('./N');
            # Decode it according to RFC 2047
            from email.header import decode_header
            parts = decode_header(name)
            name = ''
            for part in parts:
                name += part[0].decode(part[1])

            date = m.find('./RT')
            if date is not None:
                date = date.text

            self.__messages.add(OfflineMessage(id, sender, name, date))

        self._state = OfflineMessagesBoxState.SYNCHRONIZED

        if len(self.__messages) > 0:
            self.emit('messages-received', self.__messages)

Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #21 on: July 04, 2009, 12:00:01 pm »

Humm.. I see, it looks like the user who sent you the OIM had no nickname or something.. so his nickname instead of being RFC 2047 encoded (something like "=?utf-8?B?ABCDE12345?=="), it's directly his email..
We'll fix that soon, thanks for showing us this.
Logged

KaKaRoTo
yelo3
Newbie

Offline Offline

Posts: 4


View Profile
« Reply #22 on: July 06, 2009, 12:20:15 am »

I have another request: I'm trying to patch telepathy-butterfly to add support for content roaming: I think it's quite easy, but I'm very new to python (I only know very well C, C++, C# and Java). While I can read python without big problems, I'm stuck in writing code.
I've noticed that papyon ships a file called service/ContentRoaming/content_roaming.py with an interesting function: store(self, display_name=None, personal_message=None, display_picture=None) in the class ContentRoaming.

I've isolated the telepathy functions which are called when changing the nickname and the status message, but I don't know how to call papyon.
can you tell me the exact few lines of code I need to write (also the "import" statement at the beginning of the file) to call store() if I change my nickname to "NewNickname" and the message to "NewMessage"? (to have a concrete example)

Thank you very much (I hope you will open a mailing list soon!)
Logged
kjir
Power user
*
Offline Offline

Posts: 133


View Profile
« Reply #23 on: July 06, 2009, 12:36:45 am »

I don't know the answer right away, but I'm pretty sure that with your experience and a Python tutorial you can figure it out very quickly...
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!