I am developing an iOS application with chat features. I am using XMPP for that application. In XMPP Multi user chat, whether any feature is available to set avatar image or group image for the conference room like the one we do in whatsapp?
I have checked XEP-0045 extension but it wasn't helpful,
So I checked with Psi by creating conference rooms, I came to understand that the user has vcard so he can store his avatar image but the XMPP doesn't provide any vcards for the groups we create. Now I possibly understand why its not available.
Yet I can't convince how whatsapp is able to achieve. I have also thought an alternative using pub/sub to send the group image by url. But I'm searching whether any default options provided by XMPP that invisibles to my eyes.
Please conform me whether the feature is available or not in XMPP? OR suggest any different answers you have?
The better solution would be to host an image in some other server , do the upload and get the public path for that image and share as a custom stanza for the group image.
Example
Start uploading image
Get public image path like https://...some url.../groupimage_timestamp.jpg
Share this message as group chat message with following stanza
<message from=abc#muc-light.chat.server.com to mygroup#muc-light.chat.server.com type=groupchat id=groupimage-XXXX>
<body>groupimage</body>
<metadata>
<type>groupimage>
<filesize>..bytes</filesize>
<imageurl>https://...someurl.../groupimage_timestamp.jpg</imageurl>
</metadata>
</message>
Broadcast this message now as normal group message.
Once any receipient get this message he will identify that the group image url everytime you updated is different as the timestamp factory for the file name at end is differnet (if you use image caching)
it will automatically update this image after parsing this stanza.
This is how to my understanding the whatsapp guys also doing.
As of 2018, use MUC vCards: set the PHOTO-bearing vCard directly on the chatroom MUC.
https://docs.ejabberd.im/tutorials/muc-vcard/
Refer to XEP-0054 and XEP-0153.
<iq id='set1' type='set' to='test#conference.localhost'> <vCard xmlns='vcard-temp'>
<PHOTO>
<TYPE>image/png</TYPE>
<BINVAL> iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgN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>
</vCard> </iq>
Related
I am developing a extraction tool to extract microsoft-teams conversation.
It is easy to retrieve Chat Message list and its attributes (e.g. sender, html body and attachments etc) using Graph API as following.
https://graph.microsoft.com/beta/users/{user-id}/chats/{chat-id}/messages?$top=50
https://graph.microsoft.com/beta/users/{user-id}/chats/{chat-id}/messages/{msg-id}
But I cannot find 'seen' status of the message as its attribute, and/or I cannot find how to retrieve 'seen' status of the message.
For reference, microsoft-teams chat message data is defined as:
https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-beta
What I want to retrieve is the 'eye' icon status as attached image.
MS Graph currently does not expose or support the "seen/read" property of the chat message resource.
I see a feature request for it here that I suggest you upvote so that it may be implemented in future.
Is there any option to change my jId (ejabberd ID) using XMPP Framework iOS?
suppose currently my jID is 12345#localhost. I want to change it to 6789#localhost.
Its like change phone number feature in WhatsApp.
Can anybody help me please. which class or method to change it. Thank you!
The short answer is no.
A JID is the unique identifier of an entity in an XMPP system. Changing a JID would imply changing all the persistent data (own roster, buddies' rosters, temporarily stored offline messages, past chat history, group chat room membership, ...). I don't know of an XMPP server having this functionality built-in and as far as I can tell there's no XMPP extension defining such a feature.
I am working on my first IOS app which will be displayed in a public place where a user can draw an image and send this image to an email adres. I don't want to use Mail for this and the image also can not be stored on the iPad.
Therefore, i use Parse.com to store the image including name and email adres.
Now, i need to make a simple interface to send all the emails to the correct email adres including the image. We would like to check the image an email adres before sending. So i was thinking of showing some sort of tabel, with the image, name and emailadres and a send or delete button. So with a quick click we can send the image.
Now I don't know where to start!
What is the most easy way to do this? Making a second IOS app where all the images will be shown and can send/delete from? Using Mailgun and Cloud Code?
Or true a web-base interface? Using PHP?
I am all very new to this, so please help me.
Parse integrates with mail services like Mandrill so you can send e-mails from there using cloud code.
You need to have some users in the system, or some store of user details at least, then you can upload the images. Look at using a class for images, where the class just has a single PFFile and a relationship to a user.
Now, in your app you can display images and the associated user info. When hitting the 'send' button you would call a cloud function with the image objectId. The cloud code can use that to find the image, it can use Parse.Cloud.httpRequest to get the data for the image from the PFFile. Once you have that you can create your e-mail and send it.
I need to share the text or image from one ios app to Yammer social network.
I am able to do login using iOS SDK of Yammer but not getting how can I share text or image from ios app to Yammer. I got the code to share text from browser but not from application.
Anybody has any idea??
Thanks in advance for your help and efforts.
This is documented on the Yammer API page. In order to post text and attach image
https://developer.yammer.com/v1.0/docs/messages-json-post
Parameters:
body - The text of the message body.
attachmentn and pending_attachmentn - Yammer provides two methods to associate attachments with a message. Both make use of multi-part HTTP upload (see RFC1867).
The first method is the easiest, simply use file form elements with names attachment1 through attachment20. If there are a several attachments or the attachments are large it may take some time for a message to POST causing your application to appear to hang.
An alternative way is to use the Pending Attachments resource (see below for details) allowing attachments to be uploaded in parallel. Apps that support HTTP chunked transfer encoding can monitor the progress of each upload. On success each pending attachmentâs response body includes an id. These pending attachment ids are to be submitted with the message using form elements pending_attachment1 through pending_attachment20. Finally, if form elements for both attachmentN and pending_attachmentN are present only the pending_attachmentN elements will be honored.
I never used Yammer, but I wrote another app like Yammer used the given API, Yamme site should provide an API to share.
I am able to establish 1-1 chat by creating a room. I have used room because I will get history of last 50 messages (I would prefer more in number with paged results and expecting this feature in the near future).
I am unable to figure out how I can implement image and video sharing in between the text chat.
I also want this in the history I get. I mean I need to get the order of the text/image/video along with their details to display to the user.
When I upload an image file using Content module, the files are saved in a separate table in contents section (which is fine for user's gallery kind of app). But for chat we need to know who sent to whom and what (image/video/text).
I would like to know whether this is possible with the current version of the Quickblox sdk. or else is there any way we can establish this using Custom objects module? If possible, will this work if there are more number of users in the room? Please give me a solution to this.
If you want create chat with content, you need to use a Custom Objects. (in current QB version).
Advantage - you can also get chat history and implement deleting of message history.
But this method doesn't very simply.
At first you need create Custom objects represented next things:
single chat message
group chat message
(may be need create extended user profile)
At first, you can use QBChat module for changing service information between users.
When you need send message, you create Custom Object (CO) - message with parameters and upload it. When it uploading, you send service message via QB chat to your opponent user. When opponent will receive it, he should perform request for updating CO (in this case - single message).
As example, single chat message can contain next parameters:
opponent qb user id;
owner qb user id;
message text;
link to content;
Sending of content message divide to next steps:
At first, you need upload content file using Content module, and after this create message CO, upload it on server and send service message to your opponent