Strophe.j | An Objective-J wrapper around the strophe.js XMPP library
kandi X-RAY | Strophe.j Summary
kandi X-RAY | Strophe.j Summary
An Objective-J wrapper around the strophe.js XMPP library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Strophe.j
Strophe.j Key Features
Strophe.j Examples and Code Snippets
Community Discussions
Trending Discussions on Strophe.j
QUESTION
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 code:
...ANSWER
Answered 2021-Mar-12 at 10:41Ok, I finally did it. For the others that could face the same issue, I was focusing just on the reMessage function while the problem was on the onConnect function, indeed I used .bind(this)
on that particular function and everything went fine.
QUESTION
I am using Strophe.js (JS based Xmpp library). The problem is that I need to establish synchronous connection so that the response I receive is in correct order. But when I use synchronous connection, the page sort of becomes stuck. Even a right click to open console takes minutes.
I get this warning on page.
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
Please help!
...ANSWER
Answered 2020-Dec-10 at 12:47The warning just tells you that it is greatly preferred to use async calls, for a reason.
A synchronous call will block the rest of your code until a response has been received. Somehow, it takes a long time for your synchronous call to return.
Without looking at your code it is hard to tell why, but you could try retrieving the resource you are trying to get by typing its URL in in a browser and see how long it takes to get a response, or if you get a response at all, and if you see any errors.
If the resource can't be retrieved or is slow in coming, you know where the problem is and where to fix it.
There are some ways of getting XMLHttpRequest results in the right order:
- Use synchronous calls and try to make sure the server responds fast enough;
- Use asynchronous calls and start the next call when the previous has been returned succesfully (so start the next request in the callback of the previous one);
- Use asynchronous calls, store a request number, store the responses in a temporary array until all the calls have returned, and sort them;
- Some hip and modern way of doing it I don't know about but Google probably does.
QUESTION
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 these formats, according to what I have searched:
- commonjs is for node
- esm for web apps
- umd is generic
Based on this I could use esm or umd, as this app is intended to run in the browser.
I wrote a Typescript file to act as a wrapper to strophe library. This is how I import it:
...ANSWER
Answered 2020-Sep-16 at 12:04It woule be a good idea to add Strophe.js as a dependency through a package manager like npm or Yarn. It looks like you have manually placed them in the folder called dependencies
.
Adding the dependency: yarn add strophe.js
Adding the type declarations: yarn add -D @types/strophe.js
This would download Strophe.js into your node_modules
folder.
Importing it in your code:
QUESTION
I have setup an eJabberd server on my local machine. When i enter the below url in the browser:
...ANSWER
Answered 2019-Jan-15 at 07:16Please check your configuration file and see if tls is true or false under bosh configuration. If tls is true then please use HTTPS over HTTP when connecting to the bosh service URL.
QUESTION
Approaches that I have tried:
Approach 1:
Downloaded the
strophejs-1.3.4.zip
from http://strophe.im/strophejs/Placed the unzipped folder i.e.,
strophejs-1.3.4
insrc/assets
folder in my angular8 project.In my
index.html
file have included
ANSWER
Answered 2019-Dec-10 at 08:07To use npm package you should add to angular.json
projects>your-project-name>architect>build>options>scripts
like below. In the JSON file, it is a bit deep.
"scripts": [
"node_modules/jquery/dist/jquery.js",
for ordinary JS library like jquery you can import it inside a TS file like
import * as $ from 'jquery';
Using together with types and typing support might be complicated.
QUESTION
Whats is XAMP stanza for get specific(single or multiple) roster presence instead of all ?
I'm using Strophe.js for XAMPP(openfire) communication. As per Openfire didn't provide support for message status(read, received and read) at server side so, I have implemented some extra logic for make it work.
I'm retrieving my rosters by ajax call through querying Openfire db one self and returning rosters, also roster search functionality here. Problem is when I search and get roster through API so I can't get presence of roster. I want presence only for search result rosters instead all users through Strophe.js(XAMP stanza).
...ANSWER
Answered 2019-Jul-27 at 06:39I found a partial solution, it's only working when the roster is online. we can take default user status offline and we can update online presence response.
QUESTION
I'm using Strophe.js to connect to an XMPP server via websockets. Here's a sample response I get when the connected user receives a message:
...ANSWER
Answered 2019-May-16 at 21:12Once the connection is created you need to define hooks to receive the message and be able to interact with it:
QUESTION
Today I upgraded a server from Ubuntu 16.04 to 18.04, this also included a jump from ejabberd 16.01 to 18.01. Now we got a problem connecting from the client (using strophe.js)
...ANSWER
Answered 2019-Feb-21 at 08:50UPDATE: Forget everything below. Please see the answer from Badlop
Did a complete reinstall of ejabberd:
QUESTION
I apologize if the question may be too broad, surely because I'm new to XMPP.
I'm developing an Angular6 app and wish to integrate a Jabber chat in it. I've googled a lot but I don't seem to find any clear answer.
Apparently strophe.js looks promising but I cannot find any documentation on how to integrate it in an Angular5/6 project.
Any hint will be greatly appreciated
Thanks
...ANSWER
Answered 2018-Sep-22 at 17:23Well, I've found xmpp-bosh-client and ngx-chat.
The first one is at least documented. The second is not, but I can peek into sources.
May be this can help someone else in my same boots.
Thanks
P.S. If someone knows something better, he/she is most welcome
EDITI'm posting some code snippet of how I managed to connect to an eJabberd (local) server with strophe.js in a TypeScript/Angular (6.x) frontend.
chat-panel.service.ts
QUESTION
I am using eJabberd server (MAM enabled) with client library Strophe.js. Client app is storing fixed amount of the messages in local storage.
All the messages, that I receive from the server include elements and
, which provide server-side generated IDs:
ANSWER
Answered 2018-Mar-13 at 16:56There is currently no mechanism specified besides querying the archive. One prominent idea within the XMPP community to solve this in the future is to reflect the send carbon back to the original sender, which would include a stanza-id element with the ID assigned by the archive.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Strophe.j
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page