fix: allow adding own JID to roster
Enable adding oneself to the roster. Self subscriptions are implicit according to XEP-0060 / XEP-0163. So we adapt the /sub command to handle this gracefully by just printing an informative message. Profanitys logic didn't handle own presence/when adding to roster correctly. This got fixed now. Fixes: https://github.com/profanity-im/profanity/issues/2084 Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
@@ -75,6 +75,16 @@ resource_destroy(Resource* resource)
|
||||
}
|
||||
}
|
||||
|
||||
Resource*
|
||||
resource_copy(Resource* resource)
|
||||
{
|
||||
if (resource == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return resource_new(resource->name, resource->presence, resource->status, resource->priority);
|
||||
}
|
||||
|
||||
gboolean
|
||||
valid_resource_presence_string(const gchar* const str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user