Пример #1
0
 def test_notify_on_channel_post(self):
   api.channel_post(api.ROOT, 
                    nick='popular', 
                    channel="#popular", 
                    message='la la la')
   # should notify popular and unpopular
   self.assertEqual(len(xmpp.outbox), 2)
Пример #2
0
 def test_notify_on_channel_post(self):
     api.channel_post(api.ROOT,
                      nick='popular',
                      channel="#popular",
                      message='la la la')
     # should notify popular and unpopular
     self.assertEqual(len(xmpp.outbox), 2)
Пример #3
0
 def channel_post(self, actor_ref, channel_ref):
   entry_ref = api.channel_post(actor_ref,
                                channel=channel_ref.nick,
                                nick=actor_ref.nick,
                                message='test_message')
   self.exhaust_queue_any()
   return entry_ref
Пример #4
0
 def channel_post(self, actor_ref, channel_ref):
     entry_ref = api.channel_post(actor_ref,
                                  channel=channel_ref.nick,
                                  nick=actor_ref.nick,
                                  message='test_message')
     self.exhaust_queue_any()
     return entry_ref
Пример #5
0
    def channel_post(self, sender, channel_nick, message):
        sender_ref = api.actor_lookup_mobile(api.ROOT, sender)
        if not sender_ref:
            raise exception.ValidationError(HELP_SIGN_IN)

        comment_ref = api.channel_post(sender_ref,
                                       message=message,
                                       nick=sender_ref.nick,
                                       channel=channel_nick)
Пример #6
0
    def channel_post(self, from_jid, channel_nick, message):
        jid_ref = api.actor_lookup_im(api.ROOT, from_jid.base())
        if not jid_ref:
            raise exception.ValidationError(
                "You must be signed in to post, please SIGN IN")

        comment_ref = api.channel_post(jid_ref,
                                       message=message,
                                       nick=jid_ref.nick,
                                       channel=channel_nick)
Пример #7
0
  def channel_post(self, sender, channel_nick, message):
    sender_ref = api.actor_lookup_mobile(api.ROOT, sender)
    if not sender_ref:
      raise exception.ValidationError(HELP_SIGN_IN)

    comment_ref = api.channel_post(
        sender_ref,
        message=message,
        nick=sender_ref.nick,
        channel=channel_nick
    )
Пример #8
0
  def channel_post(self, from_jid, channel_nick, message):
    jid_ref = api.actor_lookup_im(api.ROOT, from_jid.base())
    if not jid_ref:
      raise exception.ValidationError(
          "You must be signed in to post, please SIGN IN")

    comment_ref = api.channel_post(
        jid_ref,
        message=message,
        nick=jid_ref.nick,
        channel=channel_nick
    )