Questions tagged [strophe.js]

Strophe.js is a JavaScript library for speaking XMPP via BOSH (XEP 124 and 206) or Websocket protocol (as per RFC 7395).

Its primary purpose is to enable web-based, real-time XMPP applications that run in any web browser.

It supports extension via a plugin system. There is a collection of Strophe.js plugins created and maintained by the community.


Useful links

54 questions
4
votes
1 answer

how to send \n neutral character in strophe.js

To implement keep alive feature for Ejabberd it recommends to send a \n character to server. I'm using strophe.js as the client library. How do I send neutral character from strophe?
gibsosmart
  • 137
  • 1
  • 8
3
votes
1 answer

Use javascript lib from typescript (with inherited javascript dependencies)

Context I am building a project in plain Typescript to communicate with a chat server. For the that communication I am using strophe.js lib. Strophe lib comes in three flavors: commonjs, esm and umd. I do not really understand the difference between…
adrisons
  • 3,443
  • 3
  • 32
  • 48
3
votes
0 answers

Issue in xmpp message listner, connection.addHandler() not call for child component (xmpp with angular6)

I am using Strophe.js to connect with XMPP server in angular6. connection.addHandler() is method to receive messages. My component structure is Parent Component: which contains users list with whom I chat and latest message below user name, which is…
Amol Chakane
  • 1,501
  • 2
  • 21
  • 43
3
votes
0 answers

How to connect & run Strophe JS files with Openfire Server?

I have installed Openfire successfully & enabled HTTP Binding at port 7070. I have downloaded strophe.js library https://github.com/strophe/strophejs & want to run its examples, but I don't know how to connect this two. Where should I place my…
3
votes
1 answer

How to use OAuth token to connect with ejabberd in Stophe.js?

I am trying to connect to ejabberd server from strophe.js. I have enabled OAuth in ejabberd and due to which I am able to get OAuth token successfully for the user, once user have been authenticated. Workflow is something like above :- When user…
Mangu Singh Rajpurohit
  • 10,806
  • 4
  • 68
  • 97
3
votes
1 answer

Prosody muc chat history is not complete

I try to make conference chat using prosody, and for the client I use strophe.js. Everything works great except one thing that the chat history shown to user when they just join in to the room is not complete. For example: One client has already…
Subkhan Sarif
  • 459
  • 9
  • 20
3
votes
0 answers

Failed to perform attach connection with Strophe.js

I'm using the attach feature from Strophe.js, so when I lose my internet connection I can keep the same session alive. Sometimes it works properly and I can do the attach, while I don't have any problem making different requests. The problem…
2
votes
1 answer

How can I show XMPP messages in a chat using Strophe on Angular?

I am making an application for messaging using Angular 10, Strophe.js and Openfire. I can connect to the server, send messages and receive them, but when I receive them I can't show the messages in the chat. Here is my…
gaetano96
  • 21
  • 4
2
votes
1 answer

How to identify delivered and undelivered messages while retreiving chat history from ejabberd?

I'm retrieving the chat history with the code below. In the view I need to show ticks for the messages whether they are delivered or not. But the message stanza structure is same for both delivered and undelivered messages. So how do I distinguish…
sashank
  • 21
  • 3
2
votes
1 answer

Listen to events when app is closed - Cordova/Phonegap

How can I listen to events when my app is closed (not in background mode)? I create chat app, with strophejs and I have listeners for messages, but they are working only when app is active or is in background. Is there a way to listen for this…
2
votes
0 answers

Import declaration conflicts when using Strophe.MUC

I had a working project using StropheJs and its typings file. When I tried to add the MUC typings file I'm getting the following errors: Namespace 'Strophe' has no exported member 'Connection' Namespace 'Strophe' has no exported member…
lopezbertoni
  • 3,551
  • 3
  • 37
  • 53
2
votes
0 answers

Strophe.js not sending iq

I tried to create an Ionic 3 mobile chat. My code looks like this: onRoster(a) { console.log("onRoster"); return true; } onRosterChanged(a) { console.log("onRosterChanged"); return true; } onPresence(a) { …
Sknt srl
  • 43
  • 5
2
votes
1 answer

MUC Room Chat History using Strophe.js web client and MongooseIM As XMPP server

I am currently struggling to get Chat Histroy of a MUCLight Room using Strophe.js. I dont want to use the direct MUC plugin. I have used the below approaches:- Sending the below IQ, but no return in the callback:-
1
vote
0 answers

Using XMPP how to get notification on chatroom creation to all participants

I am using Openfire as an XMPP server and strophe as an XMPP client. If a chatroom c1 is created by a user a and participants are b,c,d. But b and c are online and they have an active connection with XMPP server(Openfire) So, how b and c users can…
ashok
  • 1,078
  • 3
  • 20
  • 63
1
vote
1 answer

Synchronous XMLHttpRequest Strophe.js

I am using Strophe.js (JS based Xmpp library). The problem is that I need to establish synchronous connections so that the responses I receive are in the correct order. But when I use synchronous connections, the page sort of becomes stuck. Even a…
Badar
  • 19
  • 8
1
2 3 4