xmpp

Ejabberd: error in simple module to handle offline messages

吃可爱长大的小学妹 提交于 2019-12-11 09:26:06
问题 I have an Ejabberd 17.01 installation where I need to push a notification in case a recipient is offline. This seems the be a common task and solutions using a customized Ejabberd module can be found everywhere. However, I just don't get it running. First, here's me script: -module(mod_offline_push). -behaviour(gen_mod). -export([start/2, stop/1]). -export([push_message/3]). -include("ejabberd.hrl"). -include("logger.hrl"). -include("jlib.hrl"). start(Host, _Opts) -> ?INFO_MSG("mod_offline

Send facebook messages via SleekXMPP

折月煮酒 提交于 2019-12-11 09:05:07
问题 I am trying to send a message on facebook chat with sleekXMPP, using the answer from here as a boilerplate: Send a Facebook Message with XMPP using Access Tokens in Python My code is import sleekxmpp class SendMsgBot(sleekxmpp.ClientXMPP): def init(self, jid, recipient, message): print "..." sleekxmpp.ClientXMPP.__init__(self, jid, 'ignore') self.recipient = recipient self.msg = message self.add_event_handler("session_start", self.start, threaded=True) def start(self, event): self.send

Converse.js and OpenFire passwordless authentication (certificates)

浪子不回头ぞ 提交于 2019-12-11 07:59:46
问题 I want to enable passwordless authentication in Converse.js, using CA signed certificates, but I am having troubles with it. Here is what I've done: Added the CA in the truststore for OpenFire; Added the OpenFire certificate in its keystore; Created a client valid and signed certificate. I have also set some properties in the OpenFire server, i.e., sasl.mechs: EXTERNAL , xmpp.client.certificate.verify: true and xmpp.client.cert.policy: wanted . My converse script looks like: converse

sleekxmpp threaded authentication

微笑、不失礼 提交于 2019-12-11 07:55:55
问题 so... I have a simple chat client like so: class ChatClient(sleekxmpp.ClientXMPP): def __init__(self, jid, password, server): sleekxmpp.ClientXMPP.__init__(self, jid, password, ssl=True) self.add_event_handler("session_start", self.start) self.register_plugin('xep_0030') self.register_plugin('xep_0004') self.register_plugin('xep_0060') self.register_plugin('xep_0199') self.ssl_version = ssl.PROTOCOL_SSLv3 self.connected = self.connect() if self.connected: self.process(threaded=True) def start

C# Client to Client Messaging

醉酒当歌 提交于 2019-12-11 07:35:27
问题 I will try and explain exactly what I want to achieve first. Imagine two users are using a windows forms application, when User A opens a particular form a lock is applied to the data record underlying the form so that only that user can make changes at that time. User B has a list of all records (in a grid) which among others contains a reference to the record already opened by User A. What we want to do is when User A opens the records User B's list of records is updated to show a lock icon

How does apps like Whatsapp or telegram listen to the incoming call/message events on Android?

≡放荡痞女 提交于 2019-12-11 07:05:40
问题 I built a VoIP calling app which maintains a persistent connection with the server to listen to any incoming calls. I implemented a background service to do this. But since Oreo, this running code is now broken because of the introduction of Background Execution Limits After looking into forums, I found that some people are suggesting Convert Service to JobService and let android schedule it Doing so, my app won't be able to receive calls when it is stopped Run your operations in foreground

asmack send message to a rouster group

∥☆過路亽.° 提交于 2019-12-11 06:57:19
问题 I want to send a message to a roster Group (like friends group) by using asmack.(i dont want to create a room using multi user chat) Asmach has this : Message msg=new Message(java.lang.String to, Message.Type type) when want to a single user i use : Message("a@b.com",Message.Type.chat) but in group chat I think I have to use Message(java.lang.String to, Message.Type.groupchat) but I don't know what java.lang.String to should be? 回答1: XMPP does not specifiy a mechanism to send a message to a

How to get punjab/twisted to bypass dns

落花浮王杯 提交于 2019-12-11 06:48:08
问题 I am trying to get a punjab BOSH server to work with a development XMPP server. punjab is trying to do a SRV DNS lookup of the XMPP domain, which is not present in our DNS infrastructure. Is there any way I configure punjab to route requests for "myserver.mydomain.com" to an IP address? I do not have access to the xmpp:route attribute at the XML-level, so this would have to be done somehow by punjab/twisted configuration. 回答1: As a quick hack to get you up and running, install dnsmasq, add

XMPP Multiple tabs synchronize sent message

守給你的承諾、 提交于 2019-12-11 06:43:30
问题 I am implementing an Openfire chat client in a web site with Strophe.js. I managed to get multiple sessions and multiple windows reloading page and reconnecting back. Now I have challenge in restoring the chat history. But the first issue I am stuck at when a user opens two tabs of our site it creates two xmpp sessions with different resource ID's but now say a@example.com/tab1 sent a message to friend this should be synchronized in tab2 Example if you send chat message from gtalk user sent

Xmpp, Strophe Js : Multiple active connections for same user

主宰稳场 提交于 2019-12-11 06:19:16
问题 I have implemented web chat using xmpp + openfire + strophe. On the same openfire and xmpp server we have developed IOS chat as well. I am facing below problem. Lets say a user A connected in xmpp in IOS app and user A chat with user B. Now same user A connect with web chat to xmpp using strophe and user B sends the message to user A then User A will have message in the web chat connection only. Now user A connect with xmpp in IOS and User B send message then User A will get message in IOS