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

Fix FreshRSS get link #163

Merged
merged 3 commits into from
Aug 14, 2024
Merged

Conversation

Alkarex
Copy link
Contributor

@Alkarex Alkarex commented Aug 31, 2022

#fix #162
#fix FreshRSS/FreshRSS#4567

(Not tested)

Bug in:

private fun getLink(reader: JsonReader): String? {
var href: String? = null
reader.beginArray()
while (reader.hasNext()) {
reader.beginObject()
when (reader.nextName()) {
"href" -> href = reader.nextNullableString()
else -> reader.skipValue()
}
reader.endObject()
}
reader.endArray()
return href
}

the response might contain:

	"alternate": [
		[
			"href": "https://example.net",
			"type": "text/html"
		]
	]

The line "type": "text/html" is not always provided, but might be.

In any case, additional key-values should not break the parsing.

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Aug 31, 2022
Alkarex added a commit to FreshRSS/FreshRSS that referenced this pull request Aug 31, 2022
@Shinokuni
Copy link
Member

Shinokuni commented Aug 14, 2024

Hello Alkarex, thank you for your work! I'm really sorry for making you wait. Indeed, the type property is currently not managed by the adapter and the associated test fails when adding it. I'm merging this in the upcoming 2.0 which should come out very soon.

@Shinokuni Shinokuni merged commit 79575a9 into readrops:develop Aug 14, 2024
@Alkarex Alkarex deleted the fix-freshrss-get-link branch August 14, 2024 22:39
@Alkarex
Copy link
Contributor Author

Alkarex commented Aug 14, 2024

Nice to see that you have resumed the work 👍🏻
I am especially looking forward to #54 to make Readrops an interesting client for FreshRSS 🙂

@Shinokuni
Copy link
Member

Tags are on my roadmap, don't know with which version it will come out though as it is a fearly big feature.

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 this pull request may close these issues.

[BUG] Readrops error message when updating Expecting END_OBJECT issue
2 participants