Minor inbox feed, contains minor activities such as likes, shares and follows.
198575
def minor(self):
        
        url = self._subfeed("minor")
        if "minor" in self.url or "major" in self.url:
            return self
        if self._minor is None:
            self._minor = self.__class__(url, pypump=self._pump)
        return self._minor
21253
def email(self, comment, content_object, request):
        
        if not self.email_notification:
            return

        send_comment_posted(comment, request)
1133576
def _updated_cb(self, downtotal, downdone, uptotal, updone):
        
        self.emit('updated', downtotal, downdone, uptotal, updone)
1009481
function SingpostInfo(id, messages) {
    this.id = id
    this.states = messages
    this.trackerWebsite = singpost.getLink(null)
}
1250125
def notify_contact(mail, owner, graas_url, repos, first_repo=False):
    

    footer = """
--
Bitergia Cauldron Team
http://bitergia.com
    """

    twitter_txt = "Check Cauldron.io dashboard for %s at %s/dashboards/%s" % (owner, graas_url, owner)
    twitter_url = "https://twitter.com/intent/tweet?text=" + quote_plus(twitter_txt)
    twitter_url += "&via=bitergia"

    if first_repo:
        logging.info("Sending first email to %s" % (mail))
        subject = "First repository for %s already in the Cauldron" % (owner)
    else:
        logging.info("Sending last email to %s" % (mail))
        subject = "Your Cauldron %s dashboard is ready!" % (owner)

    if first_repo:
        # body = "%s/dashboards/%s\n\n" % (graas_url, owner)
        # body += "First repository analized: %s\n" % (repos[0]['html_url'])
        body = """
First repository has been analyzed and it's already in the Cauldron. Be patient, we have just started, step by step.

We will notify you when everything is ready.

Meanwhile, check latest dashboards in %s

Thanks,
%s
    """ % (graas_url, footer)
    else:
        body = """
Check it at: %s/dashboards/%s

Play with it, and send us feedback:
https://github.com/Bitergia/cauldron.io/issues/new

Share it on Twitter:
%s

Thank you very much,
%s
    """ % (graas_url, owner, twitter_url, footer)

    msg = MIMEText(body)
    msg['Subject'] = subject
    msg['From'] = 'info@bitergia.com'
    msg['To'] = mail

    try:
        s = smtplib.SMTP('localhost')
        s.send_message(msg)
        s.quit()
    except ConnectionRefusedError:
        logging.error("Can not notify user. Can not connect to email server.")
734232
private void fillHasLiked(JsonObject summary) {
    if (summary != null && summary.get("has_liked") != null) {
      hasLiked = summary.get("has_liked").asBoolean();
    }

    if (hasLiked == null && openGraphUserLikes != null) {
      hasLiked = openGraphUserLikes;
    }
  }
833668
def feed(self, from_date=None, from_offset=None, category=None,
             latest_items=None, arthur_items=None, filter_classified=None):
        

        if self.fetch_archive:
            items = self.perceval_backend.fetch_from_archive()
            self.feed_items(items)
            return
        elif arthur_items:
            items = arthur_items
            self.feed_items(items)
            return

        if from_date and from_offset:
            raise RuntimeError("Can't not feed using from_date and from_offset.")

        # We need to filter by repository to support several repositories
        # in the same raw index
        filters_ = [get_repository_filter(self.perceval_backend,
                    self.get_connector_name())]

        # Check if backend supports from_date
        signature = inspect.signature(self.perceval_backend.fetch)

        last_update = None
        if 'from_date' in signature.parameters:
            if from_date:
                last_update = from_date
            else:
                self.last_update = self.get_last_update_from_es(filters_=filters_)
                last_update = self.last_update

            logger.info("Incremental from: %s", last_update)

        offset = None
        if 'offset' in signature.parameters:
            if from_offset:
                offset = from_offset
            else:
                offset = self.elastic.get_last_offset("offset", filters_=filters_)

            if offset is not None:
                logger.info("Incremental from: %i offset", offset)
            else:
                logger.info("Not incremental")

        params = {}
        # category and filter_classified params are shared
        # by all Perceval backends
        if category is not None:
            params['category'] = category
        if filter_classified is not None:
            params['filter_classified'] = filter_classified

        # latest items, from_date and offset cannot be used together,
        # thus, the params dictionary is filled with the param available
        # and Perceval is executed
        if latest_items:
            params['latest_items'] = latest_items
            items = self.perceval_backend.fetch(**params)
        elif last_update:
            last_update = last_update.replace(tzinfo=None)
            params['from_date'] = last_update
            items = self.perceval_backend.fetch(**params)
        elif offset is not None:
            params['offset'] = offset
            items = self.perceval_backend.fetch(**params)
        else:
            items = self.perceval_backend.fetch(**params)

        self.feed_items(items)
        self.update_items()
1244746
def index
      notifications = Correspondent::Notification.for_subscriber(params[:subscriber_type], params[:subscriber_id])
      render(json: notifications) if stale?(notifications)
    end
976608
def message(self, subject, text):
        
        return self._reddit.compose(self.name, subject, text)
1038207
public function feed()
    {
        $expression = "/^" . preg_quote($this->name, "/") . "(.)*[0-9]+$/";
        $foundIndexes = array();
        foreach ($_POST as $key => $value) {
            if (preg_match($expression, $key)) {
                $foundIndexes[] = $key;
            }
        }
        
        if ((count($foundIndexes) > 0 && $_POST[$foundIndexes[0]] !== self::NO_TREEVIEW_INTERACTION_IDENTIFIER) || count($foundIndexes) === 0) {
            $this->setValues(array());
        } elseif ((count($foundIndexes) > 0 && $_POST[$foundIndexes[0]] === self::NO_TREEVIEW_INTERACTION_IDENTIFIER)) {
            array_shift($foundIndexes);
        }
        
        foreach ($foundIndexes as $index) {
            $this->addValue(tao_helpers_Uri::decode($_POST[$index]));
        }
    }
692556
function(p, callback) {
					var data = {
						visibility: {
							code: 'anyone'
						}
					};

					if (p.data.id) {

						data.attribution = {
							share: {
								id: p.data.id
							}
						};

					}
					else {
						data.comment = p.data.message;
						if (p.data.picture && p.data.link) {
							data.content = {
								'submitted-url': p.data.link,
								'submitted-image-url': p.data.picture
							};
						}
					}

					p.data = JSON.stringify(data);

					callback('people/~/shares?format=json');
				}
900509
protected function onList()
    {
        Breadcrumbs::register('notifications', function($breadcrumbs) {
            $breadcrumbs->push(trans('antares/notifications::messages.notification_templates'), handles('antares::notifications/index'));
        });
        view()->share('breadcrumbs', Breadcrumbs::render('notifications'));
    }
1312259
def following(self, account=None, limit=100):
        ''' 
        '''
        if not account:
            account = self.mainaccount
        followingnames = []
        try:
            self.followed = self.steem_instance().get_following(account, 
                '', 'blog', limit)
        except Exception as e:
            self.msg.error_message(e)
            return False
        else:
            for a in self.followed:
                followingnames.append(a['following'])
            return followingnames
241829
def feed(self, data):
        
        send = self._send_to_parser
        draw = self.listener.draw
        match_text = self._text_pattern.match
        taking_plain_text = self._taking_plain_text

        length = len(data)
        offset = 0
        while offset < length:
            if taking_plain_text:
                match = match_text(data, offset)
                if match:
                    start, offset = match.span()
                    draw(data[start:offset])
                else:
                    taking_plain_text = False
            else:
                taking_plain_text = send(data[offset:offset + 1])
                offset += 1

        self._taking_plain_text = taking_plain_text
483315
def on_receive_append_entries(self, data):
        """"""
        if self.storage.term == data['term']:
            self.state.to_follower()
831031
public List<Post> userLikes(Map<String, ?> options) {
        return requestBuilder.get("/user/likes", options).getLikedPosts();
    }
627782
def follow_user(self, user, delegate):
        
        parser = txml.Users(delegate)
        return self.__postPage('/friendships/create/%s.xml' % (user), parser)