Coder Social home page Coder Social logo

strophejs-plugin-mam's People

Contributors

debchy avatar destreyf avatar jcbrand avatar mremond avatar omichelsen avatar siadat avatar sualko avatar tamoyal avatar zash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

strophejs-plugin-mam's Issues

Uncaught TypeError: Cannot read property 'query' of undefined

i want to get offline messages, and i have used mam for that but i'm getting error like
Uncaught TypeError: Cannot read property 'query' of undefined at connection.mam.query and TypeError: connection.mam is undefined sometimes, i have installed strophejs-plugin-mam and strophejs-plugin-rsm plugins but still the error is not resolved. my code which i have used is at below

connection.mam.query(Strophe.getBareJidFromJid(connection.jid), {
				"with": $scope.to_id, "before": '', "max": '',
				onMessage: function (message) {
	
					console.log("Message from ", $(message).find("forwarded message").attr("from"),
						": ", $(message).find("forwarded message body").text());
	
					return true;
	
				},
				onComplete: function (response) {
					console.log("Got all the messages");
	
				}
			});

How to import this plugin and use in Angular.

Hello I'm getting the error. I have used this function on Strophe connection object.
here it's connection object this.connection = new Strophe.Connection(this.BOSH_SERVICE, { keepalive: true, });
here is the example -
this.connection.mam.query("[email protected]", { "with": "[email protected]", onMessage: function(message) { console.log("Message from ", $(message).find("forwarded message").attr("from"), ": ", $(message).find("forwarded message body").text()); return true; }, onComplete: function(response) { console.log("Got all the messages"); } });
getting below error.
image

issue while retrieving archived messages.

var toJid = to + '@' + xmpp_ServerConnection.domain;
				var fromJid = '53e1853e-fd47-429a-9d66-6a4285e8a650' + '@' + xmpp_ServerConnection.domain;
				xmpp_ServerConnection.mam.query(fromJid, {
					"with": toJid,
					onMessage: function (message) {
						console.log("Message from ", $(message).find("forwarded message").attr("from"),
							": ", $(message).find("forwarded message body").text());
						return true;
					},
					onComplete: function (response) {
						console.log("Got all the messages");
					}
				});

I tried with above code getting error in debug logs, error is given below,

2017-12-20 15:24:55.895 [debug] <0.30102.2>@ejabberd_http_bind:send_outpacket:1043  --- outgoing data ---


<body
	xmlns='http://jabber.org/protocol/httpbind'>
	<iq
		xmlns='jabber:client' from='[email protected]' to='[email protected]/web_4806_1513591677324' type='error' id='d4a0173f-f3cc-45b7-8915-902a5bce8bd6:sendIQ'>
		<query
			xmlns='urn:xmpp:mam:2'>
			<x
				xmlns='jabber:x:data' type='submit'>
				<field var='FORM_TYPE' type='hidden'>
					<value>urn:xmpp:mam:2</value>
				</field>
				<field var='with'>
					<value>[email protected]</value>
				</field>
			</x>
			<set
				xmlns='http://jabber.org/protocol/rsm'/>
			</query>
			<error code='503' type='cancel'>
				<service-unavailable
					xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
					<text
						xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>No module is handling this query
					</text>
				</error>
			</iq>
		</body>

Can anyone help me in this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.