Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MUC support #67

Closed
genofire opened this issue Jun 22, 2019 · 12 comments · Fixed by #69
Closed

MUC support #67

genofire opened this issue Jun 22, 2019 · 12 comments · Fixed by #69
Assignees
Milestone

Comments

@genofire
Copy link
Contributor

I found my old code again ... yaja- most of the handling is a little bit trash.

But the library of structs is still not bad (here: xmpp)

The parsing is really easy: https://dev.sum7.eu/genofire/yaja/blob/master/client/comm.go#L9-37.

Another nice feature is, that it is not necessary to iterate over all Message.Extensions we could just make a if PresenceClient.MUC !=nil because omitempty pointer are filled with nil if the values for this structs are not given.

atm i miss somethings to replace other libraries in related project:

  • muc support
  • obb (to publish image urls as http_upload)
  • html body
@mremond
Copy link
Member

mremond commented Jun 22, 2019

Thanks for the pointer, I will have a look.
Let's try to make it possible for you to use the same underlying client for all your code base :)

@genofire
Copy link
Contributor Author

FYI there are:

@mremond
Copy link
Member

mremond commented Jun 22, 2019

The main advantage of extensions is that they are extensible by the developer. You can use the lib and use your custom namespace extension.

We could have a getter for extensions, a bit similar to your nil test, that could look like (peudo-code):

	var muc MUC
	if ok := p.Get(&MUC); ok {
		// Handle MUC
	}

Anyway, I am still torn between simplicity of your approach and trying to build something that is a bit more complex but could handle more developers' needs ...

@genofire
Copy link
Contributor Author

Sounds nice - i really do not like this code: code snipped from thrempp

@mremond
Copy link
Member

mremond commented Jun 22, 2019

Ok thanks for feedback, I will try to prepare something as discussed during the week-end :)

@mremond
Copy link
Member

mremond commented Jun 22, 2019

Here is what the code looks like for Message extension: 4a4c485

I will now expand Presence to have []PresExtension and implement a similar Get method.

@mremond mremond added this to the v0.2.0 milestone Jun 23, 2019
mremond added a commit that referenced this issue Jun 23, 2019
@mremond mremond self-assigned this Jun 23, 2019
mremond added a commit that referenced this issue Jun 23, 2019
@mremond
Copy link
Member

mremond commented Jun 23, 2019

I now think that oob and MUC presence extension should be ok for your needs.
I created #68 to track the development of XHTML extension support on messages.

@mremond
Copy link
Member

mremond commented Jun 23, 2019

@genofire I have added basic HTML support (see #69). You should have everything to port your code hopefully.
Please, open new issue if you think we are still missing important features.

@genofire
Copy link
Contributor Author

#69 is for MUC not HTML

@mremond
Copy link
Member

mremond commented Jun 23, 2019

Oups, sorry, it is #70

@genofire
Copy link
Contributor Author

Supi - now i need time to migrate by Programms ;)

Thank you for developing and maintaining xmpp library, it is really useful

@mremond
Copy link
Member

mremond commented Jun 23, 2019

Thanks for your feedback and your help :)

And no rush / no pressure to upgrade your programs, I have plenty to do as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants