Esempio n. 1
0
 def do_post_account_trigged(self, info, protocol=None, name=None):
     if protocol is None:
         message = (
             "is using Digsby to manage all %(his)s instant messaging, email, "
             "and social network accounts from one application!"
         ) % {"his": action_links.his_her_their(info["gender"])}
         URL = action_links.MERGED_URL()
         media = [
             dict(
                 type="image",
                 src=protocolmeta.web_icon_url("merged_%d" % i),
                 href=action_links.clicksrc(URL, "image%d" % i),
             )
             for i in range(5)
         ]
     else:
         message = "added %(his)s %(acct_type)s account into Digsby!" % {
             "his": action_links.his_her_their(info["gender"]),
             "acct_type": action_links.get_acct_name(protocol),
         }
         URL = action_links.ACCT_BASE(protocol)
         media = [
             dict(type="image", src=protocolmeta.web_icon_url(protocol), href=action_links.clicksrc(URL, "image"))
         ]
     self.do_publish_newsfeed(info, message, URL, media)
Esempio n. 2
0
 def do_post_account_trigged(self, info, protocol=None, name=None):
     if protocol is None:
         message= (("is using Digsby to manage all %(his)s instant messaging, email, "
                    "and social network accounts from one application!") %
                   {'his':action_links.his_her_their(info['gender'])})
         URL = action_links.MERGED_URL()
         media=[
                dict(type="image",
                     src=protocolmeta.web_icon_url("merged_%d" % i),
                     href=action_links.clicksrc(URL, 'image%d' % i))
                for i in range(5)]
     else:
         message = "added %(his)s %(acct_type)s account into Digsby!" % {'his':action_links.his_her_their(info['gender']),
                                                                         'acct_type':action_links.get_acct_name(protocol)}
         URL = action_links.ACCT_BASE(protocol)
         media=[dict(type="image",
                     src=protocolmeta.web_icon_url(protocol),
                     href=action_links.clicksrc(URL, 'image'))]
     self.do_publish_newsfeed(info, message, URL, media)
Esempio n. 3
0
    def do_post_count_triggered(self, info, type_, number):
        if type_ not in self.MILESTONE_MESSAGES:
            return

        message  = self.MILESTONE_MESSAGES[type_][0] % {'his':action_links.his_her_their(info['gender']),
                                                        'number':number}
        img_type = self.MILESTONE_MESSAGES[type_][1]

        URL = action_links.COUNT_BASE(type_)
        media=[dict(type="image",
                    src=protocolmeta.web_icon_url(img_type),
                    href=action_links.clicksrc(URL, 'image'))]

        self.do_publish_newsfeed(info, message, URL, media)
Esempio n. 4
0
    def do_post_count_triggered(self, info, type_, number):
        if type_ not in self.MILESTONE_MESSAGES:
            return

        message = self.MILESTONE_MESSAGES[type_][0] % {
            "his": action_links.his_her_their(info["gender"]),
            "number": number,
        }
        img_type = self.MILESTONE_MESSAGES[type_][1]

        URL = action_links.COUNT_BASE(type_)
        media = [dict(type="image", src=protocolmeta.web_icon_url(img_type), href=action_links.clicksrc(URL, "image"))]

        self.do_publish_newsfeed(info, message, URL, media)