Example #1
0
    def channel_join(self, sender, nick):
        sender_ref = api.actor_lookup_mobile(api.ROOT, sender)
        if not sender_ref:
            raise exception.ValidationError(HELP_SIGN_IN)
        channel = clean.channel(nick)

        try:
            api.channel_join(sender_ref, sender_ref.nick, channel)
            self.send_message(
                (sender, ), "%s joined %s" % (sender_ref.display_nick(), nick))

        except:
            self.send_message((sender, ), "Failed to join %s" % nick)
Example #2
0
    def channel_join(self, from_jid, nick):
        jid_ref = api.actor_lookup_im(api.ROOT, from_jid.base())
        if not jid_ref:
            raise exception.ValidationError(
                "You must be signed in to join a channel, please SIGN IN")
        channel = clean.channel(nick)

        try:
            api.channel_join(jid_ref, jid_ref.nick, channel)
            self.send_message((from_jid, ),
                              "%s joined %s" % (jid_ref.nick, channel))

        except:
            self.send_message((from_jid, ), "Join FAILED:  %s" % channel)
Example #3
0
  def channel_join(self, sender, nick):
    sender_ref = api.actor_lookup_mobile(api.ROOT, sender)
    if not sender_ref:
      raise exception.ValidationError(HELP_SIGN_IN)
    channel = clean.channel(nick)

    try:
      api.channel_join(sender_ref, sender_ref.nick, channel)
      self.send_message((sender,),
                        "%s joined %s" % (sender_ref.display_nick(), nick))

    except:
      self.send_message((sender,),
                        "Failed to join %s" % nick)
Example #4
0
  def channel_join(self, from_jid, nick):
    jid_ref = api.actor_lookup_im(api.ROOT, from_jid.base())
    if not jid_ref:
      raise exception.ValidationError(
          "You must be signed in to join a channel, please SIGN IN")
    channel = clean.channel(nick)

    try:
      api.channel_join(jid_ref, jid_ref.nick, channel)
      self.send_message((from_jid,),
                        "%s joined %s" % (jid_ref.nick, channel))

    except:
      self.send_message((from_jid,),
                        "Join FAILED:  %s" % channel)