Pin message

        :param disable_notification:
        :return:
484881
async def pin(self, disable_notification: bool = False):
        
        return await self.chat.pin_message(self.message_id, disable_notification)
809253
def clean(self, *args, **kwargs):
        
        if self.from_user and self.from_user_id == self.to_user_id:
            raise ValidationError(_('A user cannot send a notification to herself/himself'))
622933
async def get_pin_state(self, pin):
        
        pin_list = [pin]
        await self._send_sysex(PrivateConstants.PIN_STATE_QUERY, pin_list)
        while self.query_reply_data.get(
                PrivateConstants.PIN_STATE_RESPONSE) is None:
            await asyncio.sleep(self.sleep_tune)
        pin_state_report = self.query_reply_data.get(
            PrivateConstants.PIN_STATE_RESPONSE)
        self.query_reply_data[PrivateConstants.PIN_STATE_RESPONSE] = None
        return pin_state_report
668723
def notification_message(self, title, content, icon=""):
        
        code = """
            var options = {
                body: "%(content)s",
                icon: "%(icon)s"
            }
            if (!("Notification" in window)) {
                alert("%(content)s");
            }else if (Notification.permission === "granted") {
                var notification = new Notification("%(title)s", options);
            }else if (Notification.permission !== 'denied') {
                Notification.requestPermission(function (permission) {
                    if (permission === "granted") {
                        var notification = new Notification("%(title)s", options);
                    }
                });
            }
        """ % {'title': title, 'content': content, 'icon': icon}
        self.execute_javascript(code)
1312269
def notificationNch():
    """"""
    a = L2PseudoLength(l2pLength=0x01)
    b = TpPd(pd=0x6)
    c = MessageType(mesType=0x20)  # 00100000
    d = NtNRestOctets()
    packet = a / b / c / d
    return packet
498099
def notifications(factory_id, opts = {})
      data, _status_code, _headers = notifications_with_http_info(factory_id, opts)
      return data
    end
326675
def get_notification(self, notification_id, **params):
        """"""
        response = self._get('v2', 'notifications', notification_id, params=params)
        return self._make_api_object(response, Notification)
715885
def add_notification(self, name, enabled=True):
		
		notice = {}
		notice['Notification-Name'] = name
		notice['Notification-Enabled'] = enabled

		self.notifications.append(notice)
		self.add_header('Notifications-Count', len(self.notifications))
142014
def notification_rules(self, **kwargs):
        """"""
        endpoint = '{0}/{1}/notification_rules'.format(
            self.endpoint,
            self['id'],
        )
        result = self.request('GET', endpoint=endpoint, query_params=kwargs)
        return result['notification_rules']
146164
def receive_notification(self):
        
        if not self._endpoint.receive_messages():
            raise EOFError("EOF")
        self._process_input_notification()
        self._process_input_request()
70610
def _empty_notification(self):
        
        sess = cherrypy.session
        username = sess.get(SESSION_KEY, None)
        if username in self.notifications:
            ret = self.notifications[username]
        else:
            ret = []
        self.notifications[username] = []
        return ret
182090
def alarm_disable(self):
        
        log.debug("alarm => disable...")
        params = {"enabled": False}
        self._app_exec("com.lametric.clock", "clock.alarm", params=params)
32912
private void notificationCallback(Notification notification) {
    if (notification instanceof MetricContextCleanupNotification) {
      removedMetricContext(((MetricContextCleanupNotification) notification).getMetricContext());
    }
    if (notification instanceof NewMetricContextNotification) {
      newMetricContext(((NewMetricContextNotification) notification).getMetricContext());
    }
  }
764274
def notify_slaves(self):
        """"""
        if self.disable_slave_notify is not None:
            LOGGER.debug('Slave notifications disabled')
            return False

        if self.zone_data()['kind'] == 'Master':
            response_code = self._put('/zones/' + self.domain + '/notify').status_code
            if response_code == 200:
                LOGGER.debug('Slave(s) notified')
                return True
            LOGGER.debug('Slave notification failed with code %i', response_code)
        else:
            LOGGER.debug('Zone type should be \'Master\' for slave notifications')
        return False
1142135
def status_pin(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}/pin'.format(str(id))
        return self.__api_request('POST', url)
773053
def notify(self, message):
        
        if self.complete:
            return HerokuLocalWrapper.MONITOR_STOP
        return super(DebugDeployment, self).notify(message)
418193
def notifications_dismiss(self, id):
        
        id = self.__unpack_id(id)
        params = self.__generate_params(locals())
        self.__api_request('POST', '/api/v1/notifications/dismiss', params)